/* La mesa unificada (mesa.js). Diseño aprobado: grid-clubes/maquetas/mesa-2026/mesa10.html.
   Reglas del gestor: nada de píldoras (rectángulos de 10 px como mucho), colores planos sin degradados ni filete en los círculos de jugada,
   iconos UIcons rellenos (fi-sr-*), reloj en su propio rectángulo, «Parar/Seguir» amarillo al centro con «Atrás» y «Cuarto N» al lado.
   Verde = anotó (1/2/3, el 1 es el tiro libre) · rojo = falló (1/2/3 con ✕) · azul = juego (rebotes, asistencia, robo, tapón) · ámbar = pérdida y falta.
   Las superficies, la tinta y los filetes son los tokens de la app: sirve en claro y en oscuro (en oscuro, con la piel gris del tablero de `.mesa-capa`
   y `body.es-consola`). Los colores de las jugadas y el rectángulo del reloj son FIJOS a propósito (como el marcador de un tablero):
   viven aquí, en las variables de `.ms`, y esta hoja no entra en el conteo de «color fijo» de piezas.css. Celular: encabezados arriba, números y
   jugadas debajo, las jugadas pegadas al borde de abajo; toques de 44 px como mínimo y sin scroll de lado. */
.ms { --ms-verde: #16a34a; --ms-rojo: #c62828; --ms-azul: #2f5bd3; --ms-ambar: #d99a0b; --ms-neutro: #2a3b5f; --ms-amarillo: #fbbf24;
  --ms-tablero: #0a1020; --ms-circ: 54px;
  height: 100dvh; min-height: 0; overflow: hidden; background: var(--fondo); color: var(--tinta); }
.ms button { font-family: inherit; }
.ms .dseg { font-family: var(--g-led); }

/* ── La barra de arriba ── */
.ms-barra { flex: none; display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 0 16px; background: var(--papel); border-bottom: 1px solid var(--linea); }
.ms-barra .cn-volver { min-height: 44px; }
.ms-rot { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ms-per { flex: none; font: 800 15px/1 var(--g-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--alerta-tx); white-space: nowrap; }
.ms-carga { margin: 40px auto; color: var(--tinta-2); font-size: 14px; }

/* ── La rejilla: equipo · centro · equipo ── */
.ms-cuerpo { flex: 1; min-height: 0; display: grid; gap: 10px 14px; padding: 10px 14px; overflow: hidden;
  grid-template-columns: minmax(0, 1fr) 352px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "cl cc cv" "pl cc pv"; }
.ms-cr { display: flex; flex-direction: column; gap: 8px; }
.ms-a-cl { grid-area: cl; } .ms-a-cv { grid-area: cv; }
.ms-a-pl { grid-area: pl; } .ms-a-pv { grid-area: pv; }
.ms-a-pl, .ms-a-pv { min-height: 0; overflow-y: auto; overflow-x: hidden; }
.ms-centro { grid-area: cc; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 8px; padding: 12px;
  background: var(--papel); border: 1px solid var(--linea-fuerte); border-radius: 10px; }

/* ── La tarjeta del equipo ── */
.ms-eq { display: flex; flex-direction: column; gap: 8px; }
.ms-cab { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; min-width: 0;
  background: var(--papel); border: 1px solid var(--linea); border-top: 4px solid var(--eq, var(--linea-fuerte)); border-radius: 10px; }
.ms-eq.visitante .ms-cab { direction: rtl; }
.ms-eq.visitante .ms-cab > * { direction: ltr; }
.ms-eq.visitante .ms-id { text-align: right; }
.ms-eq.visitante .ms-meta { justify-content: flex-end; }
.ms-esc .esc { width: 52px; height: 52px; flex: none; box-shadow: 0 0 0 1px var(--eq-b, transparent); }
.ms-nom { display: block; font: italic 900 20px/1.05 var(--g-firma); text-transform: uppercase; color: var(--tinta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-meta { display: flex; align-items: center; gap: 8px 10px; margin-top: 6px; flex-wrap: wrap; }
.ms-meta .rot { font-size: 10px; color: var(--tinta-3); }
.ms-cua, .ms-pun { display: inline-flex; gap: 4px; }
.ms-cua i { width: 13px; height: 13px; border-radius: 3px; border: 1.5px solid var(--linea-fuerte); }
.ms-pun i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--linea-fuerte); }
.ms-cua i.on, .ms-pun i.on { background: var(--ms-amarillo); border-color: var(--ms-amarillo); }
.ms-pts { font-size: 52px; line-height: 1; color: var(--fuerte); }
.ms-op { min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  background: var(--alzado); color: var(--tinta); border: 1px solid var(--linea); border-radius: 10px; font-weight: 800; font-size: 13px; }
.ms-op small { font: 700 10px var(--g-mono); color: var(--tinta-3); }
.ms-op:disabled { opacity: .4; cursor: default; }
.ms-op[aria-disabled="true"] { opacity: .55; }
.ms-eq > .ms-op { width: 100%; height: 44px; }

/* ── El reloj y sus mandos ── */
.ms-reloj { border-radius: 10px; background: var(--ms-tablero); padding: 8px 10px; text-align: center; }
.ms-reloj b { display: block; font-size: 58px; line-height: 1.1; color: var(--ms-amarillo); white-space: nowrap; }
.ms-ctrl { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 8px; align-items: end; }
.ms-r2 { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ms-r2 small, .ms-r small { font: 700 9.5px/1.2 var(--g-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-2); white-space: nowrap; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.ms-r2 .ms-op { width: 100%; height: 46px; font-size: 20px; }
.ms-op.pide { background: var(--ms-amarillo); border-color: var(--ms-amarillo); color: #1a1a1a; }
.ms-play { height: 54px; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; border: 1px solid var(--ms-amarillo);
  border-radius: 10px; background: var(--ms-amarillo); color: #1a1a1a; font-weight: 800; font-size: 16px; }
.ms-play i { line-height: 0; display: block; }
.ms-play.sigue, .ms-play.prorroga, .ms-play.cerrar { background: var(--ms-verde); border-color: var(--ms-verde); color: #fff; }
.ms-play.sinempate { background: var(--alzado); border-color: var(--linea); color: var(--tinta-2); }
.ms-final { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.ms-final p { margin: 0; text-align: center; font-weight: 700; font-size: 13px; color: var(--tinta-2); }

/* ── Las jugadas ── */
.ms-ca { display: flex; flex-direction: column; gap: 6px; }
.ms-sel { margin: 4px 0 0; min-height: 22px; text-align: center; font-size: 13px; font-weight: 600; color: var(--tinta-2); display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.ms-sel b { color: var(--alerta-tx); }
.ms-tipos { min-height: 32px; padding: 0 10px; background: none; border: 1px dashed var(--linea-fuerte); border-radius: 10px; color: var(--tinta-2); font-size: 12px; font-weight: 700; cursor: pointer; }
.ms-acc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; justify-items: center; }
.ms-r { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; min-height: 44px; padding: 2px 0; background: none; border: 0; cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
.ms-r.vacio { cursor: default; }
.ms-c { position: relative; width: var(--ms-circ); height: var(--ms-circ); border-radius: 50%; display: grid; place-items: center; color: #fff;
  font: 800 26px/1 var(--g-sans); box-shadow: 0 3px 8px rgba(0, 0, 0, .28); }
.ms-c i { line-height: 0; display: block; font-style: normal; }
.ms-r:active .ms-c { transform: scale(.94); }
.ms-r.anota .ms-c { background: var(--ms-verde); }
.ms-r.falla .ms-c { background: var(--ms-rojo); }
.ms-r.falla .ms-c::after { content: '✕'; position: absolute; top: -4px; right: -4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--ms-rojo);
  font: 800 12px/1 var(--g-sans); display: grid; place-items: center; box-shadow: 0 0 0 3px var(--papel); }
.ms-r.juego .ms-c { background: var(--ms-azul); }
.ms-r.error .ms-c { background: var(--ms-ambar); color: #1a1a1a; }
.ms-r.neutro .ms-c { background: var(--ms-neutro); }
.ms-ins { position: absolute; right: -4px; top: -4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #0d1b36; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--papel); }
.ms-ins svg { display: block; }
.ms-ca.ms-off .ms-r.anota, .ms-ca.ms-off .ms-r.falla, .ms-ca.ms-off .ms-r.juego, .ms-ca.ms-off .ms-r.error { opacity: .35; }

/* ── El pie del centro ── */
.ms-pie { display: flex; flex-direction: column; gap: 8px; margin-top: auto; align-items: stretch; }
.ms-ult { margin: 0; text-align: center; font: 700 10px/1.3 var(--g-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-ult b { color: var(--tinta); font-weight: 700; }
.ms-fin.pide { background: var(--ms-verde); border-color: var(--ms-verde); color: #fff; }
.ms-fin[hidden] { display: none; }
.ms-clasica { align-self: center; min-height: 44px; padding: 0 12px; background: none; border: 0; cursor: pointer; color: var(--tinta-3); font: 600 12px var(--g-sans); text-decoration: underline; text-underline-offset: 3px; }

/* ── Los números: camisetas del equipo ── */
.ms-tit { margin: 2px 0 8px; color: var(--tinta-2); }
.ms-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.ms-n { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 96px; padding: 6px 2px 5px; min-width: 0; cursor: pointer;
  background: var(--alzado); color: var(--tinta); border: 1px solid var(--linea); border-radius: 10px; -webkit-tap-highlight-color: transparent; }
.ms-n svg { width: 62%; max-width: 58px; height: auto; display: block; }
.ms-n .nm { max-width: 100%; padding: 0 3px; font-weight: 700; font-size: 12px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -2px; }
.ms-n .mi { font: 700 10px var(--g-mono); color: var(--tinta-3); }
.ms-n.sel { background: color-mix(in srgb, var(--ms-amarillo) 16%, var(--papel)); outline: 2px solid var(--ms-amarillo); outline-offset: -1px; }
.ms-n.sel .nm { color: var(--alerta-tx); }
.ms-n.fuera { opacity: .4; cursor: not-allowed; }

/* La fila «Sin número»: +1 +2 +3 al marcador sin jugador, los jugadores sin número y «Cambiar números» (se esconde con el reloj andando). */
.ms-sn { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 10px; background: var(--papel); border: 1px solid var(--linea); border-radius: 10px; }
.ms-sn .rot { margin: 0; color: var(--tinta-3); flex: 1; }
.ms-sn-g { display: flex; gap: 8px; }
.ms-sn-b { min-width: 52px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; cursor: pointer; background: var(--ms-verde); color: #fff;
  font: italic 900 20px/1 var(--g-firma); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.ms-sjs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ms-sj { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--linea); border-radius: 10px; background: var(--alzado); color: var(--tinta);
  font: 700 12px var(--g-sans); max-width: 100%; }
button.ms-sj { cursor: pointer; }
.ms-sj > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-sj small { font: 700 9px var(--g-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--alerta-tx); }
.ms-sj i { line-height: 0; display: block; }
.ms-modonum.on { background: color-mix(in srgb, var(--ms-amarillo) 22%, var(--papel)); border-color: var(--ms-amarillo); }
.ms-corre .ms-modonum { display: none; }
.ms-n.ed { outline: 2px dashed var(--ms-amarillo); outline-offset: -2px; }

/* ── El equipo sin jugadores: puntos de un toque y, en «Mis estadísticas», el resumen ── */
.ms-rap { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ms-rap > .rot { margin: 4px 0 0; color: var(--tinta-3); }
.ms-rap-p { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; height: 118px; }
.ms-rap-s { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; height: 96px; }
.ms-g { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; cursor: pointer; border: 0; border-radius: 10px;
  background: var(--ms-verde); color: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .28); }
.ms-g b { font: italic 900 36px/1 var(--g-firma); }
.ms-g span { font: 700 10px var(--g-mono); letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.ms-g i { line-height: 0; display: block; }
.ms-g.am { background: var(--ms-ambar); color: #1a1a1a; }
.ms-g.az { background: var(--ms-neutro); }
.ms-res { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--papel); border: 1px solid var(--linea); border-radius: 10px; }
.ms-res .rot { margin: 0; color: var(--tinta-3); }
.ms-lid-t { margin-top: 10px !important; }
.ms-qt { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(var(--n), 1fr) 1fr; gap: 6px; align-items: center; font: 700 13px var(--g-mono); }
.ms-qt > span { text-align: center; }
.ms-qt > b { font-family: var(--g-sans); font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-qt .tt { text-align: center; font-family: var(--g-mono); }
.ms-qt .ac { color: var(--alerta-tx); }
.ap { color: var(--tinta-3); font: 700 10px var(--g-mono); }
.ms-qt .ap { font-size: 12px; }
.ms-lid { display: grid; grid-template-columns: 22px 34px minmax(0, 1fr) repeat(3, 40px); gap: 6px 8px; align-items: center; font: 700 13px var(--g-mono); }
.ms-lid > span { text-align: center; }
.ms-lid > b { font-family: var(--g-sans); font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-lid .pt { color: var(--fuerte); font-size: 15px; }
.ms-lid svg { width: 30px; height: auto; display: block; }
.ms-med { width: 22px; height: 22px; border-radius: 50%; display: grid !important; place-items: center; color: #1a1a1a; font: 800 12px var(--g-sans); }
.ms-med.m1 { background: #fbbf24; } .ms-med.m2 { background: #cbd5e1; } .ms-med.m3 { background: #d97706; }
.ms-vacio { margin: 0; color: var(--tinta-3); font-size: 13px; }

/* ── Celular y tablet en vertical: encabezados arriba, números y jugadas debajo ── */
@media (max-width: 899px) {
  .ms-cuerpo { display: grid; overflow-y: auto; overflow-x: hidden; align-content: start; padding: 10px 12px 0; gap: 10px; width: 100%; max-width: 640px; margin-inline: auto;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: max-content;   /* alto de contenido: con `auto` las filas se encogían a 0 y las camisetas se pisaban */
    grid-template-areas: "cl cv" "cr cr" "pl pl" "pv pv" "pie pie" "ca ca"; }
  .ms-centro { display: contents; }
  .ms-cr { grid-area: cr; }
  .ms-pie { grid-area: pie; margin-top: 0; padding-bottom: 8px; }
  .ms-ca { grid-area: ca; position: sticky; bottom: 0; z-index: 3; margin: 0 -12px; padding: 6px 12px calc(8px + env(safe-area-inset-bottom));
    background: var(--papel); border-top: 1px solid var(--linea-fuerte); }
  .ms-a-pl, .ms-a-pv { overflow: visible; min-height: auto; }
  .ms-barra { gap: 10px; padding: 0 12px; }
  .ms-rot { display: none; }
  .ms-per { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
  .ms-barra .cn-red { flex: none; min-width: 0; }
  .ms-barra .cn-red.bien { display: none; }   /* «Todo guardado» no hace falta en el celular (como en la mesa clásica): el cuarto se lee completo; «Sin conexión» y «Enviando» sí se ven */
  .ms-cab { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "e p" "n n" "m m"; gap: 4px 8px; padding: 8px 10px; }
  .ms-eq.visitante .ms-cab { direction: ltr; }
  .ms-eq.visitante .ms-id, .ms-eq.visitante .ms-meta { text-align: left; justify-content: flex-start; }
  .ms-cab .ms-esc { grid-area: e; } .ms-cab .ms-id { display: contents; }
  .ms-cab .ms-pts { justify-self: end; }
  .ms-cab .ms-nom { grid-area: n; font-size: 14px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; align-self: start; min-height: 2.1em; }
  .ms-cab .ms-pts { grid-area: p; font-size: 40px; }
  .ms-cab .ms-meta { grid-area: m; margin: 0; gap: 4px 6px; align-self: center; }
  .ms-cab .ms-meta .rot { font-size: 9px; letter-spacing: .1em; }
  .ms-cua, .ms-pun { gap: 3px; }
  .ms-cua i { width: 11px; height: 11px; } .ms-pun i { width: 10px; height: 10px; }
  .ms-esc .esc { width: 34px; height: 34px; }
  .ms-reloj { padding: 4px 8px; } .ms-reloj b { font-size: 44px; }
  .ms-ctrl { gap: 6px; }
  .ms-nums { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; }
  .ms-n { min-height: 84px; }
  .ms-n .nm { font-size: 11px; } .ms-n .mi { font-size: 9px; }
  .ms-sel { min-height: 24px; font-size: 12px; }
  /* Las jugadas en 6 columnas: arriba lo que anotó y lo que falló (1 2 3 · 1✕ 2✕ 3✕), en medio el juego y abajo Falta · Planilla · Deshacer. */
  .ms-acc { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px 2px; }
  .ms-acc > :nth-child(n+13) { grid-column: span 2; }
  .ms-r { gap: 2px; padding: 1px 0; }
  .ms-r small { font-size: 8.5px; letter-spacing: 0; white-space: normal; line-height: 1.1; min-height: 19px; overflow: visible; }
  .ms-c { font-size: 21px; }
  .ms-ca { --ms-circ: 44px; }
  .ms-cuerpo { scroll-padding-bottom: 280px; }
  .ms-rap-p { height: 96px; } .ms-rap-s { height: 80px; }
  .ms-lid { grid-template-columns: 22px 30px minmax(0, 1fr) repeat(3, 32px); gap: 6px; }
}
/* Pantallas bajas (celular de 640 px de alto): las jugadas se compactan para que quede sitio a los números. */
@media (max-width: 899px) and (max-height: 720px) {
  .ms-ca { padding-top: 2px; }
  .ms-r small { font-size: 8px; min-height: 17px; }
  .ms-sel { min-height: 20px; }
}
/* Escritorio y tablet horizontal (1280×800, 1180×820): con las pestañas, el centro tiene que caber sin desplazarse: círculos de 46 px y el reloj un poco más bajo. */
@media (min-width: 900px) and (max-height: 860px) {
  .ms { --ms-circ: 46px; }
  .ms-c { font-size: 22px; }
  .ms-reloj b { font-size: 48px; }
  .ms-centro { gap: 6px; }
  .ms-r { gap: 3px; min-height: 40px; }
  .ms-ca { gap: 4px; }
}
/* Escritorio de poca altura: el centro se desplaza por dentro. */
@media (min-width: 900px) and (max-height: 760px) {
  .ms { --ms-circ: 46px; }
  .ms-c { font-size: 22px; }
  .ms-reloj b { font-size: 46px; }
}

/* ── El «?» de la barra y su ventana de ayuda (mesa.js `ayuda`). La ventana vive fuera de `.ms`, por eso lleva sus propios colores de jugada (los mismos fijos). ── */
.ms-ayuda { flex: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border-radius: 10px; border: 1px solid var(--linea); background: var(--alzado); color: var(--tinta); font: 800 18px/1 var(--g-sans); }
.cn-elige-nueva { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--tinta-2); }
.msa { --ms-verde: #16a34a; --ms-rojo: #c62828; --ms-azul: #2f5bd3; --ms-ambar: #d99a0b; --ms-neutro: #2a3b5f; --ms-amarillo: #fbbf24; }
.msa h3 { margin: 0 0 6px; }
.msa h4 { margin: 12px 0 3px; font: 800 14px/1.2 var(--g-sans); }
.msa p { margin: 0 0 6px; font-size: 13px; line-height: 1.45; color: var(--tinta-2); }
.msa p b, .msa li b { color: var(--tinta); }
.msa-dos { padding: 0; }   /* Ventanas 2026: un párrafo, sin caja (va dentro de la ventana de ayuda) */
.msa-lis { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.msa-lis li { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 1.35; color: var(--tinta-2); }
.msa-c { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 12px/1 var(--g-sans); letter-spacing: -.02em; }
.msa-c i { font-style: normal; line-height: 0; }
.msa-c.anota { background: var(--ms-verde); } .msa-c.falla { background: var(--ms-rojo); } .msa-c.juego { background: var(--ms-azul); }
.msa-c.error { background: var(--ms-ambar); color: #1a1a1a; } .msa-c.neutro { background: var(--ms-neutro); } .msa-c.reloj { border-radius: 10px; background: var(--ms-amarillo); color: #1a1a1a; }
.msa-c.falla i { position: absolute; top: -3px; right: -3px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ms-rojo); font-size: 10px; line-height: 1; }
.msa-nota { font-size: 13px; }

/* ══ MESA V2 (17-oct) · cancha con los 5, cambio, titulares, «En vivo» y la ficha del jugador ═══════════════════════════════════════════
   Diseño: maquetas/mesa-2026/mesa10.html (cancha y panel de cambio), mesa-cambios.html (titulares y «En vivo») y editar-jugador.html (la ficha).
   Mismas reglas de siempre: rectángulos de 10 px como mucho (nada de píldoras), color plano, íconos rellenos, un solo botón principal a la derecha. */
.ms { position: relative; --ms-cancha: color-mix(in srgb, var(--papel) 82%, var(--ms-azul) 9%); --ms-cancha-l: color-mix(in srgb, var(--linea-fuerte) 80%, var(--ms-azul) 20%); }
.ms-eq .ms-ops { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ms-ops.uno { grid-template-columns: 1fr; }
.ms-ops .ms-op { width: 100%; height: 44px; }
.ms-ops .ms-op i { line-height: 0; display: block; }

/* La media cancha de un equipo: sus 5 en juego, cada uno con su tiempo («⏱ 09:12», en verde mientras corre el reloj). El visitante, en espejo. */
.ms-a-pl, .ms-a-pv { display: flex; flex-direction: column; gap: 0; }
.ms-cancha { position: relative; flex: none; width: 100%; aspect-ratio: 14 / 15; border-radius: 10px; overflow: hidden; border: 2px solid var(--ms-cancha-l); color: var(--ms-cancha-l);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--tinta) 3%, transparent) 0 2px, transparent 2px 10px), var(--ms-cancha); }
.ms-cancha > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ms-n.ms-jg { position: absolute; transform: translate(-50%, -50%); width: 26%; min-height: 0; padding: 4px 0 5px; background: none; border: 0; border-radius: 10px; gap: 0; z-index: 1; }
.ms-n.ms-jg svg { width: 64%; max-width: 70px; height: auto; }
.ms-n.ms-jg .nm { display: block; max-width: 100%; margin-top: -3px; padding: 0 2px; font-size: 12px; }
.ms-n.ms-jg .mi { display: flex; gap: 6px; justify-content: center; align-items: baseline; font: 700 10px var(--g-mono); color: var(--tinta-3); }
.ms-n.ms-jg .mi .corre, .ms-ch .mi .corre, .ms-tabla .corre { color: var(--ok-tx); }
.ms-n.ms-jg .ft { font-style: normal; color: var(--alerta-tx); }
.ms-n.ms-jg .ft.fu { color: var(--ms-rojo); }
.ms-n.ms-jg.sel { background: color-mix(in srgb, var(--ms-amarillo) 18%, var(--papel)); outline: 2px solid var(--ms-amarillo); outline-offset: 0; }
.ms-n.ms-jg.ed { outline: 2px dashed var(--ms-amarillo); outline-offset: -2px; }
.ms-n.ms-jg.fuera { opacity: .45; }

/* Las pestañas del centro «Anotar · En vivo» */
.ms-tb:empty { display: none; }
.ms-seg { display: flex; gap: 4px; padding: 4px; background: var(--alzado); border-radius: 10px; }
.ms-seg > button { flex: 1; min-height: 44px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--tinta-2); font: 800 13px var(--g-sans); cursor: pointer; }
.ms-seg > button[aria-pressed="true"] { background: var(--papel); color: var(--tinta); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.ms-eqs { margin-bottom: 8px; }
.ms-eqs > button { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-vv[hidden], .ms-ca[hidden] { display: none; }
.ms-vv { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.ms-tabla { overflow-x: auto; }
.ms-tabla table { width: 100%; border-collapse: collapse; font: 700 12px var(--g-mono); }
.ms-tabla th { padding: 7px 3px; text-align: center; font: 700 10px var(--g-mono); color: var(--tinta-3); border-bottom: 1px solid var(--linea); }
.ms-tabla td { padding: 7px 3px; text-align: center; border-bottom: 1px solid var(--linea); color: var(--tinta); }
.ms-tabla .nm { text-align: left; font: 700 12.5px var(--g-sans); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-tabla th.nm { font: 700 10px var(--g-mono); }
.ms-tabla .n { text-align: left; white-space: nowrap; }
.ms-tabla tr.en .n { color: var(--ok-tx); }
.ms-pto { display: inline-block; width: 7px; height: 7px; margin-right: 3px; border-radius: 50%; background: var(--ok-tx); vertical-align: middle; }
.ms-tabla tr.tot td { font-weight: 800; border-bottom: 0; }
.ms-nota { margin: 10px 0 0; text-align: center; }
.ms-cuerpo.ms-vv-on { grid-template-columns: minmax(0, 1fr) 468px minmax(0, 1fr); }

/* «⇄ Cambio»: el panel En la cancha / Banco */
.ms-velo { position: absolute; inset: 44px 0 0 0; z-index: 29; background: rgba(5, 10, 22, .55); }
.ms-panel { position: absolute; top: 44px; bottom: 0; z-index: 30; width: min(640px, 100%); display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; overflow-y: auto;
  background: var(--papel); box-shadow: 0 0 50px rgba(0, 0, 0, .5); }
.ms-panel.local { left: 0; border-right: 1px solid var(--linea); }
.ms-panel.visitante { right: 0; border-left: 1px solid var(--linea); }
.ms-ph { display: flex; align-items: center; gap: 12px; }
.ms-ph > .v-x { align-self: flex-start; width: 44px; height: 44px; margin: -10px -12px 0 0; }   /* la mesa se toca: el ✕ en 44 px, el mismo círculo */
.ms-ph .ms-esc .esc { width: 52px; height: 52px; }
.ms-pt { flex: 1; min-width: 0; }
.ms-pt h3 { margin: 0; font: 700 17px/1.3 var(--g-sans); text-transform: none; color: var(--tinta); }   /* el título de todas las ventanas */
.ms-pt p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.35; color: var(--tinta-2); }
.ms-pc { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ms-pc > .rot { margin: 8px 0 0; }
.ms-pg5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ms-pg4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ms-ch { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 100px; padding: 6px 2px 7px; cursor: pointer; user-select: none; -webkit-user-select: none;
  background: var(--alzado); color: var(--tinta); border: 1px solid var(--linea); border-radius: 10px; font-family: inherit; -webkit-tap-highlight-color: transparent; }
.ms-ch svg { width: 48px; height: auto; display: block; pointer-events: none; }
.ms-ch .nm { max-width: 100%; padding: 0 3px; font-weight: 700; font-size: 12px; margin-top: -3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-ch .mi { font: 700 10px var(--g-mono); color: var(--tinta-2); }
.ms-ch .et { position: absolute; top: 4px; right: 4px; padding: 2px 5px; border-radius: 5px; font: 800 9px var(--g-mono); letter-spacing: .06em; text-transform: uppercase; background: var(--ms-verde); color: #fff; }
.ms-ch.sale { outline: 2.5px solid var(--ms-rojo); outline-offset: -1px; background: color-mix(in srgb, var(--ms-rojo) 9%, var(--alzado)); }
.ms-ch.sale .et { background: var(--ms-rojo); }
.ms-ch.entra { outline: 2.5px solid var(--ms-verde); outline-offset: -1px; background: color-mix(in srgb, var(--ms-verde) 11%, var(--alzado)); }
.ms-ch.fuera { opacity: .45; cursor: not-allowed; }
.ms-ch .et.fu { background: var(--ms-rojo); }
.ms-ch.blanco { outline: 2.5px dashed var(--ms-verde); outline-offset: -1px; background: color-mix(in srgb, var(--ms-verde) 12%, var(--alzado)); }
.ms-ch.arrastra { opacity: .35; }
.ms-ch.banco { touch-action: pan-y; }
.ms-fantasma { position: fixed; z-index: 2000; pointer-events: none; transform: rotate(-5deg); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); outline: 2px solid var(--ms-verde); opacity: .96; }
.ms-pp { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--linea); position: sticky; bottom: -16px; background: var(--papel); padding-bottom: 2px; }
.ms-ptx { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; color: var(--tinta-2); }
.ms-ptx b.sale { color: var(--ms-rojo); } .ms-ptx b.entra { color: var(--ok-tx); }
.ms-hacer { flex: none; min-height: 46px; padding: 0 22px; border: 0; border-radius: 10px; cursor: pointer; background: var(--ms-verde); color: #fff; font: 800 14px var(--g-sans); }
.ms-hacer:disabled { opacity: .4; cursor: default; }
@media (min-width: 900px) { .ms-ch.banco { touch-action: none; } }

/* Titulares: antes de entrar a la mesa */
.ms-tpant { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
.ms-tcue { flex: 1; min-height: 0; overflow-y: auto; width: 100%; max-width: 1000px; margin: 0 auto; padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.ms-tpart { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--papel); border: 1px solid var(--linea); border-radius: 10px; }
.ms-tpart b { font-size: 16px; min-width: 0; } .ms-tpart b.a { flex: 1; } .ms-tpart b.b { flex: 1; text-align: right; }
.ms-tpart .ms-esc .esc { width: 42px; height: 42px; }
.ms-aviso { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: var(--alerta-bg); border: 1px solid var(--alerta-linea); border-radius: 10px; color: var(--tinta); }
.ms-aviso b { color: var(--alerta-tx); font-size: 15px; } .ms-aviso p { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: var(--tinta-2); } .ms-aviso p b { font-size: inherit; color: var(--tinta); }
.ms-av-i { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ms-amarillo); color: #1a1a1a; font-weight: 900; }
.ms-tt { display: flex; align-items: flex-end; gap: 12px; }
.ms-tt > div { flex: 1; min-width: 0; }
.ms-tt h2 { margin: 2px 0 0; font: italic 900 30px/1.05 var(--g-firma); text-transform: uppercase; color: var(--tinta); }
.ms-tp { margin: 6px 0 0; color: var(--tinta-2); font-size: 14px; }
.ms-cnt { flex: none; font: italic 900 28px/1 var(--g-firma); color: var(--alerta-tx); }
.ms-cnt.ok { color: var(--ok-tx); }
.ms-tg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ms-tj { position: relative; }
.ms-tj-b { display: flex; flex-direction: column; align-items: center; width: 100%; min-height: 110px; padding: 8px 2px 6px; cursor: pointer; background: var(--papel); color: var(--tinta); border: 1px solid var(--linea); border-radius: 10px; font-family: inherit; -webkit-tap-highlight-color: transparent; }
.ms-tj-b svg { width: 52px; height: auto; display: block; }
.ms-tj-b .nm { max-width: 100%; padding: 0 3px; font-weight: 700; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-tj-b .mi { font: 700 10px var(--g-mono); color: var(--tinta-3); }
.ms-tj.on .ms-tj-b { outline: 2.5px solid var(--ms-verde); outline-offset: -1px; background: color-mix(in srgb, var(--ms-verde) 10%, var(--papel)); }
.ms-chk { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--linea-fuerte); display: grid; place-items: center; color: #fff; pointer-events: none; }
.ms-chk i { line-height: 0; display: block; }
.ms-tj.on .ms-chk { background: var(--ms-verde); border-color: var(--ms-verde); }
.ms-lap { position: absolute; top: 0; left: 0; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--tinta-3); cursor: pointer; border-radius: 8px; }
.ms-lap i { line-height: 0; display: block; }
.ms-tcue { padding-bottom: 0; }
.ms-tpie { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin: auto 0 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--fondo); border-top: 1px solid var(--linea); }
.ms-ttx { margin-right: auto; color: var(--tinta-3); font-size: 13px; }
.ms-tpie .btn { min-height: 44px; }
.ms-tf { max-width: 940px; }
.ms-atras { flex: none; min-height: 44px; padding: 0 12px; border: 1px solid var(--linea); border-radius: 8px; background: none; color: var(--tinta-2); font: 700 14px var(--g-sans); cursor: pointer; }

/* La ficha del jugador (en la misma ventana: titulares y ventana del equipo de la jornada) */
.ms-fven, .jw-eq .fx, .fx { display: flex; flex-direction: column; min-height: 0; }
.ms-fven { background: var(--papel); border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; }
.ms-fven { max-height: calc(100dvh - 44px - 36px); }
/* 31-oct (gestor): en titulares la ficha es una ventana ENCIMA de la pantalla, con el velo de siempre (.est-velo) */
.ms-fvelo { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(4,8,18,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }   /* color fijo: el velo de las ventanas */
.ms-fvelo > .ms-fven { width: min(760px, 100%); max-height: calc(100dvh - 40px); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
@media (max-width: 640px) { .ms-fvelo { padding: 10px; } .ms-fvelo > .ms-fven { max-height: calc(100dvh - 20px); } }
.ms-fven > .fx { flex: 1; min-height: 0; }
.fx > .fx-cue { min-height: 0; }
.fx { min-height: 0; }
.fx-cab { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--linea); }
.fx-t { min-width: 0; } .fx-t h3 { margin: 0; font: italic 900 22px/1.1 var(--g-firma); text-transform: uppercase; color: var(--tinta); }
.fx-cue { padding: 16px 18px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; overflow-y: auto; }
.fx-cam { text-align: center; background: var(--alzado); border-radius: 10px; padding: 16px 10px; }
.fx-j svg { max-width: 100%; height: auto; }
.fx-num { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }
.fx-n { font: italic 900 28px/1 var(--g-firma); color: var(--tinta); }
.fx-lap { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--linea); border-radius: 8px; background: var(--papel); color: var(--tinta); cursor: pointer; }
.fx-lap i { line-height: 0; display: block; }
.fx-num input { width: 90px; height: 56px; border: 2px solid var(--ms-amarillo); border-radius: 10px; background: var(--fondo); color: var(--tinta); font: 800 28px var(--g-sans); text-align: center; }
.fx-num .rot { text-align: left; }
.fx-p { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--tinta-3); }
.fx-der { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fx-nom { margin: 0; font: italic 900 26px/1.1 var(--g-firma); text-transform: uppercase; color: var(--tinta); overflow-wrap: anywhere; }
.fx-sub { margin: -6px 0 0; font-size: 13px; color: var(--tinta-2); }
.fx-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.fx-d { background: var(--alzado); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.fx-d b { display: block; margin-top: 3px; font-size: 14px; overflow-wrap: break-word; }
.fx-cambiar { justify-content: center; gap: 8px; width: 100%; min-height: 48px; }
.fx-cambiar i { line-height: 0; display: block; }
.fx-pie { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--linea); margin-top: auto; }
.fx-pie .sp { flex: 1; }
.fx-pie .btn { min-height: 44px; }
.fx-el { flex: 1; min-width: 0; font-size: 13px; color: var(--tinta-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-el b { color: var(--tinta); }
.fx-lc { display: flex; flex-direction: column; align-items: stretch; gap: 10px; grid-template-columns: none; overflow-y: auto; min-height: 0; flex: 1; }
.fx-bus { height: 44px; border: 1px solid var(--linea); border-radius: 10px; background: var(--fondo); color: var(--tinta); padding: 0 14px; font: 600 15px var(--g-sans); width: 100%; }
.fx-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.fx-chip { min-height: 36px; padding: 0 12px; border: 1px solid var(--linea); border-radius: 8px; background: none; color: var(--tinta-2); font: 700 12.5px var(--g-sans); cursor: pointer; }
.fx-chip[aria-pressed="true"] { background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
.fx-cuenta { margin: 2px 0 0; }
.fx-lis { display: flex; flex-direction: column; }
.fx-f { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 10px; text-align: left; cursor: pointer; background: none; color: var(--tinta); border: 0; border-bottom: 1px solid var(--linea); font-family: inherit; }
.fx-f svg { width: 34px; height: auto; display: block; }
.fx-fn { min-width: 0; display: flex; flex-direction: column; } .fx-fn b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fx-fn small { color: var(--tinta-3); font-size: 11.5px; }
.fx-f.on { background: color-mix(in srgb, var(--ms-verde) 11%, var(--papel)); outline: 2px solid var(--ms-verde); outline-offset: -2px; border-radius: 10px; }
.fx-f.ya { opacity: .6; cursor: default; }
.fx .tag { padding: 4px 8px; border-radius: 6px; font: 700 10px var(--g-mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.fx .tag.am { background: var(--alerta-bg); color: var(--alerta-tx); } .fx .tag.gr { background: var(--alzado); color: var(--tinta-2); }
.fx-aut { margin-top: 4px; }
.jw-eq > .fx, #uiModalBody .fx { max-height: min(80dvh, 720px); }

@media (max-width: 899px) {
  .ms-cuerpo { grid-template-areas: "cl cv" "cr cr" "tb tb" "pl pl" "pv pv" "vv vv" "pie pie" "ca ca"; }
  .ms-cuerpo.ms-vv-on { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ms-cuerpo.ms-vv-on .ms-a-pl, .ms-cuerpo.ms-vv-on .ms-a-pv { display: none; }
  .ms-tb { grid-area: tb; } .ms-vv { grid-area: vv; }
  .ms-ca[hidden] { display: none; }
  .ms-cancha { aspect-ratio: 14 / 12; }
  .ms-n.ms-jg { width: 24%; padding: 2px 0 3px; }
  .ms-n.ms-jg svg { width: 62%; max-width: 54px; }
  .ms-n.ms-jg .nm { font-size: 11px; } .ms-n.ms-jg .mi { font-size: 9.5px; }
  .ms-ops .ms-op { height: 44px; font-size: 12px; padding: 0 6px; } .ms-ops .ms-op small { display: none; }
  .ms-seg > button { min-height: 44px; }
  .ms-panel { width: 100%; padding: 12px; border: 0 !important; }
  .ms-pt p { font-size: 11.5px; }
  .ms-ph .ms-esc .esc { width: 40px; height: 40px; }
  .ms-pg5, .ms-pg4 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .ms-ch { min-height: 92px; } .ms-ch svg { width: 40px; } .ms-ch .nm { font-size: 10.5px; } .ms-ch .mi { font-size: 9px; }
  .ms-pp { bottom: -12px; flex-wrap: wrap; } .ms-hacer { width: 100%; } .ms-ptx { flex-basis: 100%; }
  .ms-tcue { padding: 12px 12px 0; gap: 12px; }
  .ms-tpie { margin: auto -12px 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .ms-tpart { padding: 10px 12px; gap: 10px; } .ms-tpart b { font-size: 13px; } .ms-tpart .ms-esc .esc { width: 34px; height: 34px; }
  .ms-tt h2 { font-size: 22px; } .ms-cnt { font-size: 22px; }
  .ms-tg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ms-tpie { flex-wrap: wrap; } .ms-ttx { flex-basis: 100%; margin-right: 0; }
  .ms-tpie .btn-primario { margin-left: auto; }
  .fx-cue { grid-template-columns: 1fr; padding: 12px; gap: 14px; }
  .fx-datos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-cab, .fx-pie { padding: 10px 12px; }
  .fx-nom { font-size: 21px; }
  .fx-f { grid-template-columns: 36px minmax(0, 1fr); } .fx-f .tag { grid-column: 2; justify-self: start; }
  .ms-vv .ms-tabla .nm { max-width: 90px; }
  .ms-tabla table { font-size: 11px; } .ms-tabla td, .ms-tabla th { padding: 7px 2px; }
}
/* La planilla de la mesa: lo que anotó la mesa de estadísticas, en una línea bajo el nombre (MIN · REB · AST · ROB · TAP · PER). */
.pl-n small.pl-st { font: 700 10.5px/1.3 var(--g-mono); letter-spacing: 0; color: var(--tinta-3); }

/* Pantalla completa: el botón queda marcado mientras está activa */
.ms-pc.on { background: var(--g-amarillo, #fbbf24); border-color: var(--g-amarillo, #fbbf24); color: #1a1a1a; }

/* ═══ Ola 2b · LA MESA SENCILLA v2 (ui.js `svVivoHTML`; maqueta grid-clubes/maquetas/celular-2026/mesas-y-jornada.html, `sencilla()` y `sencillaPC()`) ═══
   Los colores de los botones son FIJOS, como los de la completa: puntos en gris oscuro (`--sv-pil`, sin verde), ámbar la falta, gris el tiempo y el
   dock, amarillo el reloj y su botón. Las superficies y la tinta son los tokens de la app (claro y oscuro). `.sv-cel` = el celular de pie; `.sv-pc` = los
   círculos (computador, tablet y celular acostados). */
.sv { --sv-pil: #1a2b4d; --sv-pil-b: #2c4170; --sv-ambar: #d99a0b; --sv-gris: #2a3b5f; --sv-am: #fbbf24; --sv-mas: #7a87a0;
  height: 100dvh; min-height: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--fondo); color: var(--tinta);
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); }
:where(.sv) button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sv button:disabled { cursor: default; }
.sv .dseg { font-family: var(--g-led); font-weight: 400; }
.sv .rot { font: 700 10px var(--g-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tinta-3); }
.sv-barra { flex: none; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px 0 6px; }
.sv-barra .sp { flex: 1; }
.sv-barra .cn-volver { min-width: 44px; min-height: 44px; justify-content: center; margin: 0; padding: 0; color: var(--tinta-2); font-size: 11px; }
.sv-barra .cn-volver::before { display: none; }
.sv-cel .sv-barra .cn-volver { margin-right: -10px; }
.sv-cel .sv-barra .cn-volver .fi { font-size: 16px; }
.sv-t { min-width: 0; font: 800 16px var(--g-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-vivo { display: inline-flex; align-items: center; gap: 6px; font: 700 13px var(--g-sans); color: var(--error); white-space: nowrap; }
.sv-vivo::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sv .cn-red { border: 0; background: none; padding: 0; font: 700 10px var(--g-mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.sv .cn-red.bien { display: flex; color: var(--ok-tx); }
.sv-cel .sv-barra .cn-red { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .sv-cel .cn-red.bien { display: none; } }   /* «Todo guardado» no cabe en 360-375 (como en la mesa de siempre); «Sin conexión» sí se ve */
/* «•••» (también en la barra de la completa): la hoja «Cambiar de mesa». */
.sv-mas { position: relative; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--tinta-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 3px; cursor: pointer; }
.sv-mas::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 1px solid var(--linea-fuerte); }   /* el círculo de 32 de la maqueta; el toque, de 44 */
.sv-mas i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.sv-mas:hover { color: var(--tinta); }

/* El celular de pie: reloj arriba, una columna por equipo, el dock abajo. */
.sv-reloj { flex: none; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 8px 14px 8px; }
.sv-rl { display: flex; flex-direction: column; align-items: center; min-width: 120px; }
.sv-rl b { font-size: 34px; line-height: 1.1; color: var(--sv-am); }
html[data-tema="claro"] .sv-rl b { color: var(--alerta-tx); }   /* en claro el amarillo no se lee sobre el fondo: el del aviso, como el cuarto de la completa */
.sv-per, .sv-perb { font: 800 10.5px var(--g-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--tinta-2); }
.sv-per .cn-per-c, .sv-perb .cn-per-c { display: none !important; }
.sv-per .cn-per-l, .sv-perb .cn-per-l { display: inline !important; }
.sv-fl { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--sv-pil); color: var(--tinta-2); font: 800 18px/1 var(--g-sans); display: grid; place-items: center; }
.sv-fl:disabled, .sv-m:disabled { opacity: .35; }
.sv-fl-no { visibility: hidden; }
.sv-ctl.uno { grid-template-columns: 1fr; }
.sv .cn-aviso { flex: none; padding: 4px 10px; }
.sv-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); gap: 14px; padding: 4px 14px 0; }
.sv-sep { background: var(--linea-fuerte); margin: 18px 0 8px; }
.sv-cel .sv-eq { min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sv .cn-num.sv-num { flex: none; font-size: 76px; line-height: 1; width: 100%; padding: 0; margin-top: 6px; text-align: center; color: var(--fuerte); }
.sv .cn-num.sv-num.c3 { font-size: 54px; }
.sv-cel .sv-nom { display: flex; align-items: center; gap: 7px; max-width: 100%; min-width: 0; margin-top: 2px; font: 800 14px var(--g-sans); color: var(--tinta); }
.sv-cel .sv-nom b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-nom .esc { width: 26px; height: 26px; flex: none; font-size: 10px; box-shadow: 0 0 0 1px var(--eq-b, transparent); }
.sv-meta { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sv-f, .sv-tms { display: flex; align-items: center; gap: 6px; min-height: 18px; padding: 0; border: 0; background: none; color: var(--tinta-2); }
.sv-tms { position: relative; }
.sv-tms::before { content: ''; position: absolute; inset: -13px 0; }   /* 18 + 26 = 44 px de toque: tocarlo ofrece quitar el último */
.sv-tms:empty { display: none; }
.sv-cel .sv-meta .rot { font-size: 8.5px; width: 56px; text-align: right; }
.sv-cua, .sv-pun { display: inline-flex; gap: 3px; }
.sv-cua i { width: 10px; height: 10px; border-radius: 2px; border: 1.5px solid var(--linea-fuerte); }
.sv-cua i.on { background: var(--sv-am); border-color: var(--sv-am); }
.sv-f.bonus .sv-cua i.on { background: var(--error); border-color: var(--error); }
.sv-pun i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--linea-fuerte); }
.sv-pun i.on { background: var(--tinta-2); border-color: var(--tinta-2); }
.sv-f > b { font: 700 13px var(--g-mono); color: var(--tinta); }
.sv-bonus { font: 700 9px var(--g-mono) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--error) !important; }
.sv-bts { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 8px; padding-bottom: 6px; }
.sv-cel .sv-p { min-height: clamp(46px, 7.5dvh, 64px); padding: 0; border-radius: 14px; background: var(--sv-pil); border: 1px solid var(--sv-pil-b); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .22); }
.sv-cel .sv-p b { display: flex; align-items: center; padding: 0 3px; overflow: hidden; font: italic 900 36px/1 var(--g-firma); }   /* overflow: el «+» de Saira se sale de su renglón y la medida lo daba por cortado */
.sv-p i { font-style: normal; color: var(--sv-mas); font-size: 24px; line-height: 1; margin: -4px 1px 0 0; overflow: hidden; }
.sv-p:active, .sv-peq:active, .sv-red:active, .sv-ch .sv-r > button:active { transform: scale(.97); }
.sv-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sv-dos.uno { grid-template-columns: 1fr; }
.sv-peq { min-height: clamp(46px, 6.6dvh, 56px); padding: 0; border: 0; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font: 700 9px var(--g-mono); letter-spacing: .06em; text-transform: uppercase; }
.sv .ic { width: 22px; height: 22px; display: block; flex: none; }
.sv-falta, .sv-c-falta { background: var(--sv-ambar); color: #1a1a1a; }
.sv-tiempo, .sv-c-tm, .sv-red { background: var(--sv-gris); color: #fff; }
.sv .cn-tm.apagado { opacity: .45; }
.sv-ult { display: block; flex: none; align-self: stretch; margin: 6px 0 0; padding: 0 16px 10px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-ult b { color: var(--tinta); font-weight: 700; }
.sv-dock { flex: none; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 14px; align-items: start; padding: 0 18px calc(12px + env(safe-area-inset-bottom)); }
.sv-dk, .sv-r { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.sv-dk small, .sv-r small, .sv-r2 small { font: 700 8.5px var(--g-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tinta-2); white-space: nowrap; }
.sv-red { width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; }
.sv-red .ic { width: 24px; height: 24px; }
.sv-red:disabled { opacity: .4; }
.sv-play { width: 100%; height: 60px; padding: 0 12px; border: 0; border-radius: 30px; background: var(--sv-am); color: #1a1a1a; display: flex; align-items: center; justify-content: center; gap: 10px;
  font: 800 18px var(--g-sans); white-space: nowrap; box-shadow: 0 6px 16px rgba(251, 191, 36, .25); }
.sv-play .ic { width: 20px; height: 20px; }
.sv-play[hidden] { display: none; }
.sv-play span { overflow: hidden; text-overflow: ellipsis; }
/* Teléfonos bajos (≤ 700 px de alto, 375×667): menos aire y el número un poco más chico. */
@media (max-height: 700px) {
  .sv-cel .cn-num.sv-num { font-size: 60px; margin-top: 2px; }
  .sv-cel .sv-rl b { font-size: 28px; }

  .sv-cel .sv-play { height: 52px; font-size: 16px; }
  .sv-cel .sv-red { width: 50px; height: 50px; }
  .sv-cel .sv-ult { padding-bottom: 6px; margin-top: 4px; }
}
/* Tablet de pie: la misma cara, con más aire. */
@media (min-width: 621px) and (orientation: portrait) {
  .sv-cel .sv-cols { gap: 28px; padding: 12px 28px 0; }
  .sv-cel .cn-num.sv-num { font-size: 110px; }
  .sv-cel .sv-rl b { font-size: 46px; }
  .sv-cel .sv-dock { max-width: 560px; width: 100%; margin: 0 auto; }
}
/* El aviso tras anotar (toast con «Deshacer»): la tarjeta clara de la maqueta, encima del dock. */
.toast.sv-av { background: #f8fafc; color: #0f1c35; border: 0; border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); display: flex; align-items: center; gap: 12px; text-align: left; font-weight: 800; }   /* color fijo: la tarjeta clara de la maqueta */
.toast.sv-av .toast-ir { border: 0; color: #2f5bd3; margin-left: auto; padding: 10px 4px; min-height: 44px; }   /* color fijo: ídem */
body:has(.sv-cel) .toast.sv-av { bottom: calc(112px + env(safe-area-inset-bottom)); width: calc(100vw - 28px); max-width: 420px; }

/* Los círculos: computador, tablet y celular acostados (maqueta `sencillaPC()`). */
.sv-pc .sv-barra { gap: 14px; padding: 0 12px 0 16px; background: var(--papel); border-bottom: 1px solid var(--linea); }
.sv-pc .sv-barra .cn-volver { min-width: 0; padding: 0 4px; }
.sv-rot { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-perb { flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; color: var(--alerta-tx); }
.sv-perb #svRelBar { color: var(--tinta-2); font-weight: 600; letter-spacing: 0; text-transform: none; }
.sv-perb #svRelBar::before { content: '· '; }
.sv-g { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px minmax(0, 1fr); gap: 18px; padding: 18px 22px 22px; }
.sv-pc .sv-eq { container-type: inline-size; min-width: 0; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  border: 1px solid var(--linea); border-radius: 18px; background: var(--papel); padding: 18px 20px 24px; }
.sv-cab { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sv-eq.visitante .sv-cab { flex-direction: row-reverse; }
.sv-eq.visitante .sv-id { text-align: right; }
.sv-eq.visitante .sv-meta { justify-content: flex-end; }
.sv-cam { flex: none; display: block; line-height: 0; }
.sv-cam svg { width: 46px; height: auto; }
.sv-cam .esc { width: 46px; height: 46px; box-shadow: 0 0 0 1px var(--eq-b, transparent); }
.sv-id { flex: 1; min-width: 0; }
/* El nombre entero: baja a 2 líneas antes de recortar; el «…» solo si ni así cabe (más de ~22 letras). */
.sv-pc .sv-id { container-type: inline-size; }
.sv-pc .sv-nom { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font: italic 900 clamp(12px, 15cqi, 22px)/1.15 var(--g-firma); text-transform: uppercase; color: var(--tinta); overflow-wrap: normal; }
.sv-pc .sv-meta { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 8px 12px; margin-top: 8px; }
.sv-pc .sv-cua i { width: 14px; height: 14px; }
.sv-pc .sv-pun i { width: 12px; height: 12px; }
.sv-pc .cn-num.sv-num { width: 1.7em; flex: none; margin: 0; font-size: 80px; text-align: right; }
.sv-pc .cn-num.sv-num.c3 { width: 2.55em; font-size: 64px; }
.sv-pc .visitante .cn-num.sv-num { text-align: left; }
.sv-circs { display: flex; justify-content: center; gap: 22px; }
.sv-pc .sv-r { gap: 8px; }
.sv-pc .sv-r small { font-size: 10.5px; }
.sv-pc .sv-p { --d: min(116px, calc((100cqi - 44px) / 3), 19dvh); width: var(--d); height: var(--d); padding: 0; border-radius: 50%; background: var(--sv-pil); border: 1.5px solid #34507f; color: #fff;
  display: flex; align-items: center; justify-content: center; white-space: nowrap; font: italic 900 calc(var(--d) * .43)/1 var(--g-firma); box-shadow: 0 3px 8px rgba(0, 0, 0, .28); }
.sv-pc .sv-p i { font-size: .6em; margin: -.15em 2px 0 0; }
.sv-ch .sv-r > button { width: 80px; height: 80px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 3px 8px rgba(0, 0, 0, .28); }
.sv-ch .sv-r > button .ic { width: 32px; height: 32px; }
.sv-ch .sv-r > button:disabled { opacity: .4; }
.sv-c { min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; border: 1px solid var(--linea-fuerte); border-radius: 18px; background: var(--papel); padding: 18px 16px; }
.sv-rel { width: 100%; border-radius: 12px; background: #0a1020; text-align: center; padding: 10px 0; }   /* color fijo: el rectángulo del reloj, el de la completa (--ms-tablero) */
.sv-rel b { display: block; font-size: 64px; line-height: 1.1; color: var(--sv-am); white-space: nowrap; }
.sv-ctl { width: 100%; display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 8px; align-items: end; }
.sv-r2 { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.sv-m { width: 100%; height: 50px; padding: 0; border-radius: 12px; background: var(--alzado); border: 1px solid var(--linea); color: var(--tinta); font: 800 20px/1 var(--g-sans); }
.sv-pc .sv-play { height: 58px; border-radius: 12px; font-size: 17px; gap: 8px; box-shadow: 0 3px 8px rgba(0, 0, 0, .28); }
.sv-pos { display: flex; align-items: center; gap: 10px; }
.sv-flecha { min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--tinta-2); font: 800 18px var(--g-sans); }
.sv-pos-n { font-size: 26px; min-width: 1.6em; text-align: center; color: var(--tinta); }
.sv-pos-n.rojo { color: var(--error); }
/* Ola 2b · A del gestor: la flecha de posesión también en el celular de pie, una fila corta bajo el reloj. */
.sv-pos-cel { flex: none; justify-content: center; margin: 4px 14px 2px; }
.sv-pos-cel .sv-flecha { font-size: 15px; white-space: nowrap; color: var(--eq, var(--tinta-2)); }   /* iniciales del equipo con su color (ui.js `svPintarCentro`) */
.sv-m.sv-m2 { width: 56px; height: 44px; font-size: 14px; }
.sv-dk2 { margin-top: auto; gap: 34px; }
.sv-pc .sv-red { width: 80px; height: 80px; }
.sv-pc .sv-red .ic { width: 30px; height: 30px; }
.sv-pc .sv-ult { padding: 0; margin: 0; max-width: 100%; }
/* Celular acostado (≤ 932 × 430) y pantallas bajas: lo mismo, apretado para que quepa entero en `100dvh`. */
@media (max-height: 560px) {
  .sv-pc .sv-barra { min-height: 44px; }
  .sv-g { grid-template-columns: minmax(0, 1fr) 236px minmax(0, 1fr); gap: 10px; padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  .sv-pc .sv-eq { padding: 10px 12px 12px; gap: 8px; border-radius: 14px; }
  .sv-pc .sv-cab { gap: 10px; }
  .sv-cam svg { width: 34px; } .sv-cam .esc { width: 34px; height: 34px; }
  .sv-pc .sv-nom { font-size: clamp(11px, 15cqi, 16px); }
  .sv-pc .sv-meta { margin-top: 4px; gap: 4px 8px; }
  .sv-pc .sv-cua i { width: 10px; height: 10px; } .sv-pc .sv-pun i { width: 9px; height: 9px; }
  .sv-pc .cn-num.sv-num { font-size: 48px; }
  .sv-pc .cn-num.sv-num.c3 { font-size: 38px; }
  .sv-circs { gap: 12px; }
  .sv-pc .sv-r { gap: 4px; }
  .sv-pc .sv-r small { font-size: 8.5px; }
  .sv-ch .sv-r > button, .sv-pc .sv-red { width: 52px; height: 52px; }
  .sv-ch .sv-r > button .ic, .sv-pc .sv-red .ic { width: 24px; height: 24px; }
  .sv-c { gap: 8px; padding: 10px; border-radius: 14px; }
  .sv-rel { padding: 4px 0; } .sv-rel b { font-size: 38px; }
  .sv-m { height: 44px; }
  .sv-pc .sv-play { height: 48px; font-size: 15px; }
  .sv-ctl { gap: 8px; }
  .sv-r2 small { display: none; }
  .sv-dk2 { gap: 22px; }
  .sv-flecha { font-size: 14px; }
  .sv-perb #svRelBar { display: none; }
  .sv-pc .sv-meta .rot { display: none; }
  .sv-pc .sv-tms { min-width: 44px; }
}

/* ═══ Ola 2b · «Cambiar de mesa» (ui.js `mesaCambiar`; maqueta `cambio1/2/3()`): la hoja de abajo con las tres mesas. ═══ */
.mz-hoja { --mz-am: #fbbf24; }
.mz { padding: 0 var(--v-pad, 18px) calc(14px + env(safe-area-inset-bottom)); }
.mz-p { margin: 0 0 14px; color: var(--tinta-2); font-size: 13.5px; line-height: 1.45; }
.mz-h { margin: 2px 0 4px; font: 800 21px/1.2 var(--g-sans); color: var(--tinta); }
.mz-grupo { border-radius: 14px; background: var(--alzado); overflow: hidden; }
.mz-fila { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; margin: 0; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--linea); border-radius: 0;
  background: none; color: var(--tinta); text-align: left; font: inherit; cursor: pointer; }
.mz-fila:last-child { border-bottom: 0; }
.mz-fila > svg { flex: none; }
.mz-fila > .ic { width: 22px; height: 22px; color: var(--tinta-2); }
.mz-fila:hover { background: color-mix(in srgb, var(--fuerte) 5%, transparent); }
.mz-info .mz-fila { cursor: default; }
.mz-info .mz-fila:hover { background: none; }
.mz-fila .tx { flex: 1; min-width: 0; }
.mz-fila .tx b { display: block; font: 700 15px/1.3 var(--g-sans); }
.mz-fila .tx small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.35; color: var(--tinta-2); }
.mz-op.peligro .tx b { color: var(--error); }
.mz-ch { flex: none; color: var(--tinta-3); font: 700 20px/1 var(--g-sans); }
.mz-chk { flex: none; color: var(--mz-am); display: grid; }
.mz-ahora { font: 700 9px var(--g-mono); letter-spacing: .08em; text-transform: uppercase; color: #1a1a1a; background: var(--mz-am); border-radius: 5px; padding: 2px 5px; margin-left: 4px; vertical-align: 2px; }
.mz-lab { display: block; margin: 18px 4px 8px; font: 700 12px var(--g-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--tinta-2); }
.mz-lab2 { display: flex; justify-content: space-between; gap: 10px; }
.mz-lab2 b { color: var(--tinta-3); }
.mz-lab2 b.ok { color: var(--ok-tx); }
.mz-lab2 b.am { color: var(--alerta-tx); }
.mz-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 3px; border-radius: 10px; background: var(--hundido); }
.mz-seg button { min-height: 44px; padding: 0 4px; border: 0; border-radius: 8px; background: none; color: var(--tinta-2); font: 700 12.5px/1.2 var(--g-sans); cursor: pointer; }
.mz-seg button[aria-pressed="true"] { background: var(--alzado); color: var(--tinta); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.mz-jg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mz-j { position: relative; height: 62px; padding: 0; border: 0; border-radius: 12px; background: var(--alzado); display: grid; place-items: center; cursor: pointer; }
.mz-j svg { width: 40px; height: auto; }
.mz-j.on { background: color-mix(in srgb, var(--mz-am) 14%, var(--alzado)); box-shadow: inset 0 0 0 2px var(--mz-am); }
.mz-j em { position: absolute; top: 4px; right: 5px; width: 18px; height: 18px; border-radius: 50%; background: var(--mz-am); color: #1a1a1a; display: grid; place-items: center; }
.mz-j em svg { width: 12px; height: 12px; }
.mz-nota { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; color: var(--tinta-2); font-size: 12.5px; line-height: 1.4; }
.mz-nota .ic { width: 18px; height: 18px; flex: none; }
.mz .ic { display: block; }
.mz-ok, .mz-no { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: rgba(34, 197, 94, .16); color: #22c55e; }   /* color fijo: los de la maqueta */
.mz-ok svg { width: 16px; height: 16px; }
.mz-no { background: rgba(217, 154, 11, .18); color: #f0b429; }   /* color fijo: ídem */
.mz-prim { display: block; width: 100%; min-height: 52px; margin-top: 16px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--mz-am); color: #1a1a1a; font: 800 15px var(--g-sans); cursor: pointer; }
.mz-prim:disabled { opacity: .45; cursor: default; }
.mz-atras { min-height: 44px; margin: -10px 0 -10px -6px; padding: 0 6px; border: 0; background: none; color: var(--tinta-2); font: 600 15px var(--g-sans); cursor: pointer; }

/* ═══ Ola 2b · la completa con el celular de pie: «Gira el celular» (mesa.js `giroHTML`; maqueta `girar()`) ═══ */
.ms-giro { display: none; }
@media (max-width: 620px) and (orientation: portrait) {
  .ms .ms-cuerpo { display: none; }
  .ms-giro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 0 34px; text-align: center; }
  .ms-giro h3 { margin: 0; font: 800 22px var(--g-sans); color: var(--tinta); }
  .ms-giro p { margin: 0; color: var(--tinta-2); font-size: 14.5px; line-height: 1.5; }
  .ms-giro .ms-giro-n { font-size: 12.5px; color: var(--tinta-3); }
  .ms-giro-b { width: 100%; min-height: 50px; margin-top: 8px; padding: 0 18px; border: 1px solid var(--linea); border-radius: 14px; background: var(--alzado); color: var(--tinta); font: 800 14px var(--g-sans); cursor: pointer; }
  .ms .ms-barra .ms-pc { display: none; }
}

/* ═══ Ola 2b · la completa en el celular ACOSTADO (≤ 932 × 430; maqueta `completa()`): cabe entera en `100dvh`, sin nada cortado ═══
   Equipo · centro · equipo: arriba cada equipo con su marcador, debajo su media cancha con los 5 en dos filas (3 + 2) y abajo «Cambio» y «T.M.»;
   al centro el reloj con ‹ Parar › en una fila y las jugadas en 5 × 3 (anotar, fallar, rebotes; asistencia, robo, tapón, pérdida, falta; planilla y
   deshacer al final). Lo que no cabe se queda en su sitio de siempre: «Terminar» y «Mesa clásica» van en «•••» (la hoja) y en el celular más bajo
   (≤ 379 px) las pestañas «Anotar · En vivo» se esconden. */
@media (orientation: landscape) and (max-height: 500px) {
  .ms { padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); }
  .ms-barra { min-height: 44px; gap: 10px; padding: 0 10px; background: none; border-bottom: 0; }
  .ms-barra .ms-rot { display: block; flex: 1; }
  .ms-per { flex: none; font-size: 12px; }
  .ms-barra .ms-ayuda { width: 44px; height: 44px; font-size: 15px; }
  .ms-cuerpo { display: grid; overflow: hidden; max-width: none; width: 100%; margin: 0; padding: 0 10px calc(6px + env(safe-area-inset-bottom)); gap: 6px 10px; scroll-padding-bottom: 0;
    grid-template-columns: minmax(0, 1fr) 318px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-auto-rows: auto;
    grid-template-areas: "cl cc cv" "pl cc pv" "ol cc ov"; }
  .ms-a-cl, .ms-a-cv, .ms-a-cl > .ms-eq, .ms-a-cv > .ms-eq { display: contents; }
  .ms-eq.local > .ms-cab { grid-area: cl; } .ms-eq.visitante > .ms-cab { grid-area: cv; }
  .ms-eq.local > :is(.ms-ops, .ms-op) { grid-area: ol; } .ms-eq.visitante > :is(.ms-ops, .ms-op) { grid-area: ov; }
  .ms-ops { gap: 6px; }
  .ms-op { min-height: 44px; font-size: 12px; }
  .ms-cab { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "e n p" "e m p"; gap: 2px 8px; padding: 6px 10px; border-top-width: 3px; }
  .ms-eq.visitante .ms-cab { direction: rtl; }
  .ms-eq.visitante .ms-id, .ms-eq.visitante .ms-meta { text-align: right; justify-content: flex-start; }
  .ms-cab .ms-nom { font-size: 13px; white-space: nowrap; display: block; -webkit-line-clamp: none; min-height: 0; align-self: end; }
  .ms-cab .ms-pts { font-size: 32px; }
  .ms-cab .ms-meta { gap: 3px 6px; align-self: start; }
  .ms-cab .ms-meta .rot { display: none; }
  .ms-esc .esc { width: 26px; height: 26px; font-size: 10px; }
  .ms-cua i { width: 10px; height: 10px; } .ms-pun i { width: 9px; height: 9px; }
  .ms-a-pl, .ms-a-pv { min-height: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; align-content: stretch; }
  .ms-a-pl > :not(.ms-sn):not(.ms-sjs), .ms-a-pv > :not(.ms-sn):not(.ms-sjs) { grid-column: 1 / -1; }   /* la cancha (o el panel de un toque) arriba; «Sin número» y el lápiz en una fila debajo */
  .ms-sn { margin: 0; padding: 0 0 0 8px; gap: 6px; min-width: 0; }
  .ms-sn .rot { flex: none; width: 30px; font-size: 0; }
  .ms-sn .rot::after { content: 'Sin nº'; font-size: 8px; letter-spacing: .06em; line-height: 1.2; white-space: normal; }   /* «Sin número», corto: no cabe entero junto a +1 +2 +3 */
  .ms-sn-g { flex: 1; min-width: 0; gap: 4px; }
  .ms-sn-b { flex: 1; min-width: 44px; padding: 0 4px; font-size: 15px; }
  .ms-sjs { margin: 0; flex-wrap: nowrap; gap: 4px; }
  /* Si hay jugadores sin número (con su nombre), van en su propia fila debajo; si no, el lápiz va al lado de «Sin número». */
  :is(.ms-a-pl, .ms-a-pv):has(.ms-sjs > .ms-sj:not(.ms-modonum)) > .ms-sjs { grid-column: 1 / -1; overflow-x: auto; }
  .ms-sj { min-width: 44px; padding: 0 10px; justify-content: center; } .ms-modonum > span { display: none; }   /* acostado, «Cambiar números» es el lápiz solo (su aria-label lo dice) */
  .ms-a-pl { grid-area: pl; } .ms-a-pv { grid-area: pv; }
  .ms-cancha { min-height: 0; height: 100%; aspect-ratio: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: space-evenly; justify-items: center; gap: 0; padding: 2px; }
  .ms-cancha > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .ms-n.ms-jg { position: relative; left: auto !important; top: auto !important; transform: none; width: 100%; min-height: 44px; padding: 2px 0 3px; }
  .ms-n.ms-jg svg { width: 36px; max-width: none; }
  .ms-n.ms-jg .nm { font-size: 10px; margin-top: 0; line-height: 1.2; }
  .ms-n.ms-jg .mi { font-size: 8px; }
  .ms-res { display: none !important; }
  .ms-vv:not([hidden]) { flex: 1; min-height: 0; overflow: auto; }
  /* «Anotar · En vivo» sube a la barra, al centro: abajo no cabe sin morder las jugadas */
  #msPantalla.ms { position: relative; }
  .ms-tb { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 2; width: 200px; }
  .ms-tb .ms-seg { padding: 0; gap: 2px; background: none; } .ms-tb .ms-seg > button { min-height: 44px; font-size: 12px; }
  .ms-barra .ms-rot { flex: 0 1 auto; max-width: calc(50% - 215px); letter-spacing: .08em; }
  .ms-barra .ms-per { margin-left: auto; }
  .ms-cuerpo.ms-vv-on { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr); }   /* «En vivo»: la hoja ancha al centro; las canchas esperan */
  .ms-cuerpo.ms-vv-on .ms-a-pl, .ms-cuerpo.ms-vv-on .ms-a-pv { display: none; }

  .ms-nums { overflow-y: auto; }
  .ms-rap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
  .ms-rap > .rot { display: none; }
  .ms-rap-p { flex: 1; height: auto; min-height: 0; } .ms-rap-s { height: 56px; }
  .ms-centro { grid-area: cc; display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; overflow: hidden; }
  .ms-cuerpo { grid-template-columns: minmax(0, 1fr) 320px minmax(0, 1fr); }
  .ms-cr { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 44px; gap: 6px; align-items: center; }
  .ms-ctrl, .ms-r2 { display: contents; }
  .ms-r2 small { display: none; }
  .ms-ctrl > .ms-r2:first-child > button { order: 1; }
  .ms-reloj { order: 2; padding: 4px 2px; min-width: 0; overflow: hidden; } .ms-reloj b { font-size: 24px; }
  .ms-play { order: 3; min-height: 44px; height: 44px; padding: 0 10px; font-size: 13px; gap: 6px; }
  .ms-ctrl > .ms-r2:last-child > button { order: 4; }
  .ms-cr .ms-op { min-height: 44px; height: 44px; padding: 0; }
  .ms-ca { flex-direction: column; position: static; margin: 0; padding: 0; border: 0; background: none; }
  .ms-sel { min-height: 16px; font-size: 11.5px; text-align: center; }
  .ms-acc { --ms-circ: 42px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 2px; }
  .ms-acc > :nth-child(-n+3) { order: 1; } .ms-acc > :nth-child(7), .ms-acc > :nth-child(8) { order: 2; }
  .ms-acc > :nth-child(n+4):nth-child(-n+6) { order: 3; } .ms-acc > :nth-child(n+9) { order: 4; }
  .ms-acc > :nth-child(n+13) { grid-column: auto; }
  .ms-r { gap: 2px; padding: 0; min-height: 44px; }
  .ms-r small { font-size: 0; min-height: 0; white-space: nowrap; }
  .ms-r small::after { content: attr(data-c); font-size: 7.5px; letter-spacing: .03em; }
  .ms-c { font-size: 19px; }
  .ms-pie { margin-top: auto; padding: 0; }
  .ms-pie .ms-fin, .ms-pie .ms-clasica { display: none; }
  .ms-ult { font-size: 8.5px; text-align: center; }
  /* «Cambio» acostado: la misma hoja, apretada para que el banco y «Hacer el cambio» quepan sin desplazarse */
  .ms-ph { padding-top: 4px; padding-bottom: 4px; } .ms-pt p { display: none; } .ms-ph .ms-esc .esc { width: 32px; height: 32px; }
  .ms-pc .rot { margin: 2px 0; }
  .ms-pg5, .ms-pg4 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .ms-ch { min-height: 0; padding: 2px 0; gap: 0; } .ms-ch svg { width: 30px; }
  .ms-pp { flex-wrap: nowrap; bottom: 0; } .ms-ptx { flex: 1 1 auto; } .ms-hacer { width: auto; flex: none; padding: 0 22px; }
}
@media (orientation: landscape) and (max-height: 379px) { .ms-tb { display: none; } }
@media (orientation: landscape) and (max-height: 500px) and (max-width: 720px) {
  .ms-cuerpo { grid-template-columns: minmax(0, 1fr) 280px minmax(0, 1fr); }
  .ms-reloj b { font-size: 22px; }
  .ms-acc { --ms-circ: 38px; }
}
.sv > .cn-nota { flex: none; width: auto; margin: 2px 14px 4px; font-size: 12px; }

/* 31-oct (gestor, opción C): titulares = media cancha con el quinteto + banca que llena el alto (sin huecos). */
.ms-tpant .ms-tcue:has(.ms-tq) { max-width: 1280px; scroll-padding-bottom: 110px; }
.ms-tq { flex: none; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 16px; align-items: stretch; }
.ms-cancha { position: relative; aspect-ratio: 100 / 94; background: var(--hundido); border: 1px solid var(--linea); border-radius: 14px; overflow: hidden; }
.ms-cancha > svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--linea-fuerte); }
.ms-cancha > svg * { vector-effect: non-scaling-stroke; stroke-width: 1.5px; }
.ms-cancha .ms-pos { position: absolute; transform: translate(-50%, -50%); width: 30%; display: grid !important; justify-items: center; gap: 2px; background: none; border: 0; padding: 4px; color: var(--tinta); font-family: inherit; cursor: pointer; text-align: center; -webkit-tap-highlight-color: transparent; }
.ms-cancha .ms-pos > svg { width: 62px; height: auto; display: block; }
.ms-cancha .ms-pos b { max-width: 100%; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-cancha .ms-pos small { font: 700 10.5px var(--g-mono); color: var(--tinta-3); }
.ms-cancha .ms-pos.vacia { cursor: default; }
.ms-cancha .ms-pos.vacia i { width: 52px; height: 58px; border: 2px dashed var(--linea-fuerte); border-radius: 12px; display: block; }
.ms-cancha .ms-pos.vacia small { font: 600 11px var(--f-texto); }
.ms-tq .ms-tg { grid-template-columns: repeat(var(--tg-c, 2), minmax(0, 1fr)); grid-template-rows: repeat(var(--tg-f, 5), minmax(54px, 1fr)); gap: 8px; }
.ms-tq .ms-tj-b { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 9px; align-content: center; justify-items: start; min-height: 0; height: 100%; padding: 6px 30px 6px 8px; text-align: left; }
.ms-tq .ms-tj-b > svg { width: 34px; grid-row: 1 / 3; align-self: center; }
.ms-tq .ms-tj-b .nm { font-size: 13.5px; padding: 0; max-width: 100%; }
.ms-tq .ms-tj-b .mi { grid-column: 2; }
.ms-tq .ms-tj.on .ms-tj-b > * { opacity: .45; }
.ms-tq .ms-chk { top: 6px; right: 6px; width: 18px; height: 18px; }
.ms-tq .ms-lap { left: auto; right: 0; top: auto; bottom: 0; width: 44px; height: 44px; }
.ms-tpant .ms-aviso { padding: 10px 14px; } .ms-tpant .ms-aviso p { font-size: 13px; }
@media (max-width: 760px) {
  .ms-tq { grid-template-columns: 1fr; gap: 12px; }
  .ms-cancha { aspect-ratio: 100 / 72; }
  .ms-cancha .ms-pos > svg { width: 42px; } .ms-cancha .ms-pos b { font-size: 12px; } .ms-cancha .ms-pos.vacia i { width: 38px; height: 42px; }
  .ms-tq .ms-tg { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 54px; }
}

/* 31-oct (gestor): sin lápiz en cada tarjeta — «Cambiar números» pone la banca en modo editar (borde punteado + ✎ amarillo). */
.ms-tban { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.ms-tban .ms-tg { flex: 1; }
.ms-tbh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ms-tedit { min-height: 40px; gap: 7px; } .ms-tedit i { line-height: 0; }
.ms-tban.editar .ms-tj-b { border-style: dashed; border-color: color-mix(in srgb, var(--ms-amarillo, #fbbf24) 55%, transparent); }
.ms-tban.editar .ms-tj.on .ms-tj-b > * { opacity: 1; }
.ms-tq .ms-tban .ms-lap { top: 50%; bottom: auto; right: 8px; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 8px; background: var(--ms-amarillo, #fbbf24); color: #1b1e26; pointer-events: none; }
.ms-tq .ms-tj-b { padding-right: 12px; }
.ms-tban.editar .ms-tj-b { padding-right: 44px; }
/* La ficha con Elso */
.fx-cue.fx-elso { grid-template-columns: 290px minmax(0, 1fr); gap: 28px; padding: 24px 32px 28px 24px; align-items: stretch; }
.fx-lobo { display: flex; align-items: center; justify-content: center; padding: 4px 0 14px; }
.fx-lobo .elso-pie { --h: 360px !important; }
.fx-globo { position: relative; margin: 0; padding: 12px 14px; border-radius: 14px; background: #fff; color: #0f1e3b; font-size: 14px; line-height: 1.45; }
.fx-globo::after { content: ""; position: absolute; left: -8px; bottom: 16px; border: 8px solid transparent; border-right-color: #fff; border-left: 0; }
.fx-elso .fx-num { justify-content: flex-start; gap: 14px; margin: 0; }
.fx-elso .fx-j svg { width: 96px; }
.fx-campo { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.fx-campo input { width: 100%; height: 64px; border: 2px solid var(--ms-amarillo, #fbbf24); border-radius: 12px; background: var(--fondo); color: var(--tinta); font: italic 900 34px var(--g-firma); padding: 0 14px; }
.fx-libres { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fx-libres span { font: 700 10px var(--g-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--tinta-3); margin-right: 4px; }
.fx-libres button { min-width: 44px; height: 44px; border: 0; border-radius: 9px; background: var(--alzado); color: var(--tinta); font: 700 14px var(--g-mono); cursor: pointer; }
.fx-elso .fx-datos { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-elso .fx-d { padding: 6px 10px; font-size: 12.5px; color: var(--tinta-2); }
.fx-elso .fx-d b { display: inline; margin: 0; }
@media (max-width: 640px) {
  .fx-cue.fx-elso { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px; }
  .fx-lobo { display: none; }   /* 31-oct (gestor): en el celular, sin Elso */
  .fx-globo::after { display: none; }
  .fx-elso .fx-j svg { width: 60px; } .fx-campo input { height: 54px; font-size: 28px; }
}
/* 2-nov · Titulares con el celular acostado (poco alto): fuera el aviso y la ayuda, encabezado y pie en una línea, y la cancha al lado de la banca */
@media (orientation: landscape) and (max-height: 500px) {
  .ms-tpant .ms-aviso, .ms-tpant .ms-tp, .ms-tpant .ms-tt .rot { display: none; }
  .ms-tpant .ms-tpart { padding: 6px 12px; } .ms-tpant .ms-tpart .ms-esc { transform: scale(.8); }
  .ms-tpant .ms-tt { margin: 6px 0; } .ms-tpant .ms-tt h2 { font-size: 20px; } .ms-tpant .ms-cnt { font-size: 22px; }
  .ms-tq { grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 10px; }
  .ms-cancha { aspect-ratio: 100 / 72; }
  .ms-cancha .ms-pos > svg { width: 40px; } .ms-cancha .ms-pos b { font-size: 11.5px; } .ms-cancha .ms-pos.vacia i { width: 34px; height: 38px; }
  .ms-tq .ms-tg { grid-template-rows: none; grid-auto-rows: 48px; }
  .ms-tpie { flex-wrap: nowrap; padding: 6px max(12px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .ms-tpie .ms-ttx { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
