/* Pole de Muertos · [zonia] — estilos. Móvil primero (360–430 px). Piel de Día de Muertos: papel picado, cempasúchil, rosa mexicano.
   powered by [zonia] */

/* ───────────── Tokens ───────────── */
:root {
  /* Paleta de arte/muertos/PALETA.md (modo día) */
  --papel: #FFF4DE;
  --papel-2: #FCE6C2;
  --tarjeta: #FFFAF0;
  --tinta: #25172F;
  --suave: #5B4A6B;
  --rosa: #E4007C;
  --rosa-boton: #C8006A;
  --rosa-osc: #A80057;
  --cempa: #FF8A00;
  --cempa-txt: #A84900;
  --cempa-claro: #FFE8C2;
  --morado: #5B2A86;
  --morado-osc: #1B0F2C;
  --lila: #F1E6FA;
  --verde: #0F8A4F;
  --verde-osc: #0A6B3A;
  --verde-claro: #D9F1E3;
  --rojo: #D8232F;
  --rojo-txt: #B8141F;
  --dorado: #F5B21A;
  --dorado-txt: #7A5200;
  --linea: rgba(156, 118, 55, .45);
  --sombra: rgba(37, 23, 47, .85);

  --f-titulo: 'Chicle', 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --f-cuerpo: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --safe-b: env(safe-area-inset-bottom, 0px);
  --h-powered: 26px;
  --h-tabs: 58px;
  --h-dock: calc(var(--h-powered) + var(--h-tabs) + var(--safe-b));
  --h-barra: 0px;
  --ancho: 560px;
}
@font-face { font-family: 'Chicle'; src: url('/fuentes/Chicle-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
body.sin-nav { --h-tabs: 0px; }
body.con-barra { --h-barra: 74px; }

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--h-dock) + var(--h-barra) + 18px);
  font-family: var(--f-cuerpo);
  font-size: 15px;
  line-height: 1.45;
  color: var(--tinta);
  background-color: var(--papel);
  /* Papel con puntitos de cempasúchil */
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(255, 255, 255, .7), transparent 55%),
    radial-gradient(rgba(255, 138, 0, .15) 1.2px, transparent 1.7px);
  background-size: auto, 14px 14px;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
/* Tira de papel picado en el borde de arriba */
body::before {
  content: ''; position: absolute; z-index: 2; top: 0; left: 0; right: 0; height: 16px; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--rosa) 0 24px, var(--cempa) 24px 48px, var(--morado) 48px 72px, var(--verde) 72px 96px);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 24px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 24px 100%;
}

img, svg { max-width: 100%; }
a { color: var(--morado); }
h1, h2, h3, p, ul, ol { margin-top: 0; }
button { font-family: inherit; }

#vista {
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 26px) 16px 8px;
  min-width: 0;
  outline: none;
}
#vista h1:focus, #vista :focus:not(:focus-visible) { outline: none; }

:focus-visible { outline: 3px solid var(--rosa-boton); outline-offset: 2px; border-radius: 4px; }

.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.oculto-accesible { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.centrado { text-align: center; }

/* ───────────── Tipografía ───────────── */
.vista-cab { margin-bottom: 14px; }
.vista-titulo, .saludo__t, .tuto__titulo, .subtitulo, .invita__t {
  font-family: var(--f-titulo);
  font-weight: 400;
  color: var(--morado-osc);
  letter-spacing: .01em;
}
.vista-titulo { margin: 0 0 4px; font-size: 30px; line-height: 1.08; overflow-wrap: anywhere; }
.vista-sub { margin: 0; font-size: 13px; color: var(--suave); }
.subtitulo { margin: 0 0 8px; font-size: 23px; line-height: 1.2; }
.mini-t { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--suave); }
.enlace { appearance: none; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--morado); text-decoration: underline; cursor: pointer; min-height: 24px; }
.enlace-chico { font-size: 12px; color: var(--suave); }

/* ───────────── Cartas con banda de papel picado ───────────── */
.letrero {
  position: relative;
  padding: 11px 38px 12px;
  text-align: center;
  color: var(--papel);
  background:
    radial-gradient(circle at 17px 50%, var(--cempa) 0 4px, #ffd27a 4.5px 6px, transparent 6.5px),
    radial-gradient(circle at calc(100% - 17px) 50%, var(--cempa) 0 4px, #ffd27a 4.5px 6px, transparent 6.5px),
    linear-gradient(180deg, var(--morado), var(--morado-osc));
  border-bottom: 3px solid var(--cempa);
}
.letrero__t { margin: 0; font-family: var(--f-titulo); font-weight: 400; font-size: 21px; line-height: 1.1; letter-spacing: .02em; overflow-wrap: anywhere; }
.letrero__s { margin: 4px 0 0; font-size: 12.5px; color: #F4E1FF; }

.carta {
  position: relative;
  margin: 0 0 16px;
  min-width: 0;
  background: var(--tarjeta);
  border: 2px solid var(--tinta);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--sombra);
  overflow: hidden;
}
.carta__cuerpo { padding: 14px 14px 16px; min-width: 0; }
.carta__cuerpo > :last-child { margin-bottom: 0; }
.carta-ranking .carta__cuerpo, .carta-orden .carta__cuerpo { padding: 0; }
.carta-vacia .carta__cuerpo { text-align: center; }
.carta-nuevo { border-color: var(--rosa); box-shadow: 4px 4px 0 var(--rosa-osc); }

.sello { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 12px 8px; font-size: 11px; color: var(--suave); }
.sello__logo { height: 13px; width: auto; display: block; }
.sello-carta { border-top: 1px dashed var(--linea); }

/* ───────────── Botones ───────────── */
.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; max-width: 100%;
  padding: 10px 18px;
  border: 2px solid var(--tinta);
  border-radius: 12px;
  background: var(--rosa-boton);
  color: var(--tarjeta);
  font: 700 15px/1.2 var(--f-cuerpo);
  text-align: center; text-decoration: none; overflow-wrap: anywhere;
  box-shadow: 0 3px 0 var(--tinta);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 var(--tinta); }
.btn:disabled { background: #E4D8EE; color: #6B5C7A; border-color: #9C8BB0; box-shadow: 0 3px 0 #9C8BB0; cursor: not-allowed; filter: none; }
.btn svg { width: 20px; height: 20px; flex: none; fill: none; }
.btn-sec { background: var(--tarjeta); color: var(--tinta); }
.btn-azul { background: var(--morado); color: #fff; }
.btn-peligro { background: var(--rojo-txt); color: #fff; }
.btn-wa { background: var(--verde-osc); color: #fff; }
.btn-wa svg { fill: currentColor; }
.btn-google { background: #fff; color: var(--tinta); }
.btn-grande { display: flex; width: 100%; min-height: 52px; font-size: 16px; }
.btn-chico { min-height: 40px; padding: 6px 12px; font-size: 13px; border-radius: 10px; box-shadow: 0 2px 0 var(--tinta); }
.acciones-par { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }

.ic-btn {
  appearance: none; flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--morado); font-size: 15px; font-weight: 700; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ic-btn:hover:not(:disabled) { background: rgba(91, 42, 134, .12); }
.ic-btn:active:not(:disabled) { background: rgba(91, 42, 134, .25); }
.ic-btn:disabled { opacity: .3; cursor: default; }
.ic-btn-x { color: var(--rojo-txt); }

/* ───────────── Formularios ───────────── */
.form { display: grid; gap: 14px; min-width: 0; }
.campo { display: grid; gap: 6px; min-width: 0; }
.campo__etq { font-weight: 700; font-size: 14px; }
.campo__etq em { font-style: normal; font-weight: 500; color: var(--suave); }
.campo__ayuda { margin: 0; font-size: 12.5px; color: var(--suave); }
.campo__error { margin: 0; font-size: 13px; font-weight: 600; color: var(--rojo-txt); }
.form-error { margin: 0; padding: 10px 12px; border: 2px solid var(--rojo); border-radius: 10px; background: #FDE3E5; color: #7A0B1D; font-weight: 600; font-size: 14px; }
.form-nota { margin: 0; font-size: 12.5px; color: var(--suave); }
.con-error > .campo__ayuda { display: none; }

.aviso { margin: 0 0 14px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; line-height: 1.4; border: 2px solid var(--morado); border-radius: 12px; background: var(--lila); }
.aviso a, .aviso .enlace { margin-left: 6px; }
.aviso-grupo { background: var(--cempa-claro); border-color: var(--cempa-txt); }
.aviso-borrador { background: var(--lila); border-color: var(--morado); }
.aviso-ok { background: var(--verde-claro); border-color: var(--verde-osc); color: #064A2C; }
.aviso-prov { background: var(--cempa-claro); border-color: var(--cempa-txt); color: #5B2A00; }
.aviso-red { background: #FDE3E5; border-color: var(--rojo); color: #7A0B1D; }

.entrada {
  display: block; width: 100%; min-width: 0; min-height: 48px;
  padding: 10px 12px;
  font: 500 16px/1.3 var(--f-cuerpo);
  color: var(--tinta); background: #fff;
  border: 2px solid var(--tinta); border-radius: 10px;
  box-shadow: inset 0 2px 0 rgba(30, 18, 48, .08);
  appearance: none; -webkit-appearance: none;
}
.entrada::placeholder { color: #8c7e9c; }
.entrada:focus-visible { outline: 3px solid var(--rosa-boton); outline-offset: 1px; }
.entrada-codigo { font-size: 22px; font-weight: 700; letter-spacing: .18em; text-align: center; text-transform: uppercase; }
input[type='datetime-local'].entrada { min-height: 48px; }
.con-error > .entrada, .con-error .entrada-pass .entrada { border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(200, 16, 46, .2); }
.entrada-pass { position: relative; }
.entrada-pass .entrada { padding-right: 52px; }
.ojo { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; border: 0; background: transparent; font-size: 20px; cursor: pointer; border-radius: 8px; }

/* Casillas */
.casilla { display: grid; gap: 4px; }
.casilla__fila { position: relative; display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 6px 0; cursor: pointer; font-size: 14px; line-height: 1.4; -webkit-tap-highlight-color: transparent; }
.casilla__input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.casilla__marca { flex: none; width: 26px; height: 26px; margin-top: 1px; background: #fff; border: 2px solid var(--tinta); border-radius: 7px; box-shadow: inset 0 2px 0 rgba(30, 18, 48, .08); }
.casilla__input:checked + .casilla__marca { background: var(--rosa-boton); border-color: var(--tinta); }
.casilla__input:checked + .casilla__marca::after { content: ''; display: block; width: 7px; height: 13px; margin: 2px 0 0 7px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.casilla__input:focus-visible + .casilla__marca { outline: 3px solid var(--rosa-boton); outline-offset: 2px; }
.casilla__txt { min-width: 0; }
.casilla__txt a { color: var(--morado); font-weight: 600; }
.casilla__ayuda { padding-left: 36px; font-size: 12px; }
.casilla.con-error .casilla__marca { border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(200, 16, 46, .2); }
.casilla.con-error .casilla__ayuda { display: block; }
.casillas-lista { display: grid; gap: 2px; margin: 0 0 12px; }
.casilla__fila-lista { padding: 4px 0; }

.divisor { display: flex; align-items: center; gap: 10px; margin: 14px 0; font-size: 12.5px; color: var(--suave); }
.divisor::before, .divisor::after { content: ''; flex: 1; height: 0; border-top: 2px dashed var(--linea); }
.google { display: grid; gap: 8px; }
.aviso-simple { margin: 0 0 14px; padding: 8px 10px; font-size: 11.5px; line-height: 1.4; color: var(--suave); background: var(--papel); border: 2px dashed var(--linea); border-radius: 10px; }
.aviso-simple p { margin: 0; }
.aviso-simple p:last-child { margin: 0; }
.aviso-simple a { color: var(--morado); }

.iab { padding: 12px; background: var(--cempa-claro); border: 2px solid var(--cempa-txt); border-radius: 12px; }
.iab__t { margin: 0 0 2px; font-weight: 700; }
.iab__s { margin: 0 0 10px; font-size: 13px; }
.iab__op { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.revisa { display: grid; gap: 10px; text-align: center; justify-items: center; }
.revisa__t { margin: 0; font-family: var(--f-titulo); font-weight: 400; font-size: 26px; color: var(--morado-osc); }
.revisa p { margin: 0; }
.revisa__correo { overflow-wrap: anywhere; }
.revisa__op { display: grid; width: 100%; gap: 8px; }
.ilu-revisa { width: 96px; aspect-ratio: 1; }

/* Pestañas segmentadas */
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px;
  margin: 0 0 14px; padding: 4px;
  border: 2px solid var(--tinta); border-radius: 14px;
  background: var(--morado-osc);
  box-shadow: 3px 3px 0 var(--sombra);
}
.seg__op {
  appearance: none; min-height: 44px; min-width: 0; padding: 6px 4px;
  border: 0; border-radius: 9px; background: transparent;
  color: #EBDDF7; font: 700 13.5px/1.15 var(--f-cuerpo); text-align: center; overflow-wrap: anywhere; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.seg__op[aria-selected='true'], .seg__op[aria-pressed='true'] { background: var(--cempa); color: var(--tinta); box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.seg .seg__op:focus-visible { outline-color: #fff; }

/* ───────────── Portada / hero ───────────── */
.hero {
  position: relative; margin: 0 0 14px; overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, #FFD08A 0%, var(--cempa) 50%, var(--rosa) 100%);
  border: 2px solid var(--tinta); border-radius: 16px;
  box-shadow: 4px 4px 0 var(--sombra);
}
.hero__ilu { position: absolute; inset: 0; display: grid; place-items: center; }
.hero__ilu .ilu__img { object-fit: cover; }
.hero__ilu .ilu__emoji { font-size: 84px; }

.portada { margin: 4px 0 14px; text-align: center; }
.portada__sup { margin: 0 0 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); }
.portada__t { margin: 0; font-family: var(--f-titulo); font-weight: 400; font-size: clamp(38px, 12vw, 54px); line-height: 1; letter-spacing: .01em; color: var(--morado-osc); text-shadow: 3px 3px 0 var(--cempa); overflow-wrap: anywhere; }
.portada__lema { margin: 10px auto 0; max-width: 36ch; font-size: 14px; color: var(--suave); text-wrap: balance; }
.portada-chica { margin-top: 0; }
.portada-chica .portada__t { font-size: clamp(32px, 9.4vw, 42px); }
.carta-form .carta__cuerpo { padding: 16px 14px 18px; }

/* ───────────── Pill de estado ───────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; white-space: nowrap;
  color: var(--tinta); background: var(--papel-2); border: 2px solid var(--tinta);
}
.pill-vivo { background: var(--rojo-txt); color: #fff; }
.pill__punto { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulso 1.2s ease-in-out infinite; }
.pill-final { background: var(--morado); color: #fff; }
.pill-pend { background: var(--cempa-claro); }
.pill-abierto { background: var(--verde-claro); color: var(--verde-osc); border-color: var(--verde-osc); }
.pill-prov { background: var(--cempa); }
@keyframes pulso { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* ───────────── Inicio ───────────── */
.saludo { margin: 0 0 14px; }
.saludo__t { margin: 0; font-size: 31px; line-height: 1.08; overflow-wrap: anywhere; }
.saludo__s { margin: 4px 0 0; font-size: 13px; color: var(--suave); }
.estado-fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; min-width: 0; }
.estado-txt { margin: 0; font-weight: 700; font-size: 14.5px; min-width: 0; }
.estado-txt.falta { color: var(--cempa-txt); }
.estado-en_vivo { color: var(--rojo-txt); }
.cuenta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 10px 0 2px; }
.cuenta__e { font-size: 13px; color: var(--suave); font-weight: 600; }
.cuenta__v { font-size: 29px; line-height: 1.1; font-weight: 700; color: var(--rosa-boton); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.fecha { margin: 2px 0 12px; font-size: 12.5px; color: var(--suave); }
.carta-sesion .btn-grande { margin-top: 4px; }

.pasos { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.pasos li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; }
.paso__n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--cempa); border: 2px solid var(--tinta); font-family: var(--f-titulo); font-weight: 400; font-size: 19px; }

.grupo-lista { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.carta-grupos .grupo-lista { margin-top: 0; }
.grupo-fila { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 56px; padding: 8px 10px; color: inherit; text-decoration: none; background: var(--papel); border: 2px solid var(--tinta); border-radius: 12px; -webkit-tap-highlight-color: transparent; }
.grupo-fila:active { background: var(--papel-2); }
.grupo-fila__info { display: grid; min-width: 0; gap: 1px; }
.grupo-fila__nombre { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 700; font-size: 14.5px; line-height: 1.2; overflow-wrap: anywhere; }
.grupo-fila__nombre em { flex: none; padding: 0 6px; font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--cempa); border-radius: 6px; }
.grupo-fila__sub { font-size: 12px; color: var(--suave); overflow-wrap: anywhere; }
.grupo-fila__ir { font-size: 22px; color: var(--morado); }
.grupo-fila__lugar { display: grid; justify-items: center; line-height: 1.05; min-width: 44px; padding: 3px 6px; background: var(--lila); border: 2px solid var(--morado); border-radius: 10px; }
.grupo-fila__lugar b { font-family: var(--f-titulo); font-weight: 400; font-size: 22px; color: var(--morado-osc); }
.grupo-fila__lugar small { font-size: 10px; color: var(--suave); }

.vacio { text-align: center; padding: 4px 0 12px; }
.vacio__t { margin: 6px 0 4px; font-family: var(--f-titulo); font-size: 22px; color: var(--morado-osc); }
.vacio__s { margin: 0 auto; max-width: 34ch; font-size: 13.5px; color: var(--suave); }
.ilu-vacio { width: 104px; aspect-ratio: 1; margin: 0 auto; }
.familia-res { margin: 0 0 12px; font-size: 14px; }

/* Puente a [zonia] */
.puente { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: start; margin: 0 0 16px; padding: 14px; background: var(--lila); border: 2px solid var(--tinta); border-radius: 14px; box-shadow: 4px 4px 0 var(--sombra); }
.ilu-puente { width: 72px; aspect-ratio: 1; }
.puente__sup { margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--morado); }
.puente__t { margin: 0 0 6px; font-family: var(--f-titulo); font-weight: 400; font-size: 21px; line-height: 1.1; color: var(--morado-osc); overflow-wrap: anywhere; }
.puente__s { margin: 0 0 10px; font-size: 13px; }
.puente .btn { min-height: 44px; }
.puente-compacta { margin-top: 4px; }

/* Pregunta rápida (perfil de negocio) */
.pregunta { display: grid; gap: 10px; margin: 0 0 16px; padding: 12px 14px; background: var(--cempa-claro); border: 2px dashed var(--cempa-txt); border-radius: 14px; }
.pregunta__t { margin: 0; font-weight: 700; font-size: 14px; }
.pregunta__op { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pregunta__op .btn { min-height: 48px; padding: 6px 4px; font-size: 13px; }
.pregunta__no { justify-self: center; font-size: 12px; font-weight: 500; color: var(--suave); min-height: 36px; }

/* ───────────── Avatares / fichas de piloto ───────────── */
.avatar { position: relative; display: grid; place-items: center; flex: none; width: var(--tam, 44px); height: var(--tam, 44px); border-radius: 50%; overflow: hidden; background: var(--bg, var(--morado)); border: 2px solid var(--tinta); }
.avatar__img { display: block; width: 84%; height: 84%; object-fit: contain; }
.avatar__ini { font-weight: 700; font-size: calc(var(--tam, 44px) * .38); }

.punto-eq { display: inline-block; flex: none; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; background: var(--eq, #909090); border: 1.5px solid rgba(30, 18, 48, .6); vertical-align: middle; }
.chip-p { display: inline-flex; align-items: center; gap: 0; padding: 1px 8px 1px 7px; vertical-align: middle; min-width: 0; background: #fff; border: 1.5px solid rgba(30, 18, 48, .55); border-radius: 6px; overflow: hidden; font-size: 12.5px; line-height: 1.5; white-space: nowrap; max-width: 100%; }
.chip-p b { letter-spacing: .02em; }
.chip-p-g { font-size: 13px; }
.chip-p__ape { min-width: 0; margin-left: 6px; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: var(--suave); }

.puntitos { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.puntitos i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--morado); background: transparent; }
.puntitos i.on { background: var(--verde); border-color: var(--verde); }
.puntitos-g i { width: 13px; height: 13px; }

/* ───────────── Editor del pronóstico ───────────── */
.jugadores { display: flex; flex-wrap: nowrap; gap: 8px; margin: 0 -16px 14px; padding: 2px 16px 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.jugadores::-webkit-scrollbar { display: none; }
.jug { appearance: none; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 70vw; padding: 4px 12px 4px 6px; font: 600 13.5px/1.1 var(--f-cuerpo); color: var(--tinta); background: var(--tarjeta); border: 2px solid var(--tinta); border-radius: 999px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.jug.sel { background: var(--rosa-boton); color: var(--tarjeta); box-shadow: 0 3px 0 var(--tinta); }
.jug__n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jug__ok { font-style: normal; font-weight: 700; color: var(--verde-osc); }
.jug.sel .jug__ok { color: #fff; }
.jug-mas { padding-left: 14px; border-style: dashed; background: transparent; color: var(--morado); }
.vista-quien { margin-top: 2px; font-weight: 700; }
.confirmacion { display: grid; gap: 10px; }
.confirmacion:empty { display: none; }
.confirmacion .aviso { margin: 0; }

.progreso { margin: 0 0 12px; }
.progreso__fila { display: flex; align-items: center; gap: 10px; }
.progreso__n { font-family: var(--f-titulo); font-weight: 400; font-size: 26px; color: var(--morado-osc); min-width: 3.4ch; }
.progreso__riel { flex: 1; height: 14px; border: 2px solid var(--tinta); border-radius: 999px; background: #fff; overflow: hidden; }
.progreso__lleno { height: 100%; background: repeating-linear-gradient(45deg, var(--cempa) 0 8px, #FFB347 8px 16px); transition: width .25s ease; }
.progreso__pista { margin: 6px 0 0; font-size: 13px; color: var(--suave); min-height: 2.9em; }

.slots { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.slot {
  position: relative; display: flex; align-items: stretch; min-width: 0;
  background: var(--tarjeta); border: 2px solid var(--tinta); border-radius: 12px;
  box-shadow: 0 3px 0 var(--sombra); overflow: hidden;
}
.slot.vacio { border-style: dashed; background: rgba(255, 255, 255, .6); box-shadow: none; }
.slot.sel { background: var(--lila); border-color: var(--rosa); box-shadow: 0 0 0 3px rgba(214, 0, 111, .3); }
.slot__cuerpo { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; min-height: 62px; padding: 5px 2px 5px 8px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.slot__pos { flex: none; width: 42px; display: grid; justify-items: center; line-height: 1.1; }
.slot__pos b { font-family: var(--f-titulo); font-weight: 400; font-size: 21px; color: var(--morado); }
.slot__pos small { font-size: 11px; font-weight: 700; color: var(--cempa-txt); white-space: nowrap; }
.slot__piloto { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.slot__piloto-vacio { color: var(--suave); font-size: 13px; }
.slot__linea { display: flex; align-items: baseline; gap: 6px; }
.slot__cod { font-size: 16px; letter-spacing: .02em; }
.slot__num { font-size: 11px; color: var(--suave); }
.slot__ape { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.slot__eq { display: flex; align-items: center; font-size: 11px; line-height: 1.15; color: var(--suave); overflow-wrap: anywhere; }
.slot__acc { flex: none; display: flex; align-items: center; padding-right: 2px; }

.establo { margin: 18px 0 16px; }
.establo__cab { margin-bottom: 10px; }
.fichas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ficha {
  position: relative; display: grid; gap: 1px; align-content: center; min-width: 0; min-height: 68px;
  padding: 8px 10px; text-align: left; font: inherit; color: inherit;
  background: var(--tarjeta); border: 2px solid var(--tinta); border-radius: 12px;
  box-shadow: 0 3px 0 var(--sombra); overflow: hidden; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ficha:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sombra); }
.ficha__linea { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.ficha__cod { font-size: 16px; letter-spacing: .02em; }
.ficha__num { font-size: 11px; color: var(--suave); }
.ficha__ape { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.2; }
.ficha__eq { display: flex; align-items: center; font-size: 11px; color: var(--suave); overflow-wrap: anywhere; line-height: 1.2; }
.ficha.usada { background: #E9DFF3; color: #5E4E70; box-shadow: none; transform: translateY(2px); border-style: dashed; }
.ficha__lugar { padding: 0 6px; border-radius: 6px; background: var(--verde-osc); color: #fff; font-size: 11.5px; font-weight: 700; }

/* Barra fija con cuenta regresiva y «Mandar» */
#slot-barra { position: fixed; left: 0; right: 0; bottom: var(--h-dock); z-index: 45; pointer-events: none; }
.barra-guardar {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  max-width: var(--ancho); margin: 0 auto; min-height: var(--h-barra);
  padding: 9px 16px;
  background: var(--tarjeta); border-top: 3px solid var(--tinta);
  box-shadow: 0 -8px 16px -8px rgba(30, 18, 48, .35);
}
.barra-guardar.sucio { background: var(--cempa-claro); }
.barra__info { flex: 1; min-width: 0; }
.barra__cuenta { margin: 0; font-size: 12.5px; color: var(--suave); }
.barra__cuenta b { font-size: 16px; color: var(--rosa-boton); font-variant-numeric: tabular-nums; }
.barra__estado { margin: 1px 0 0; font-size: 12.5px; font-weight: 700; overflow-wrap: anywhere; line-height: 1.25; }
.barra-guardar .btn { flex: none; min-width: 112px; max-width: 46%; }

/* ───────────── Después del cierre ───────────── */
.panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; min-width: 0; }
.panel > * { min-width: 0; }
.franja-sesion { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 12px; min-width: 0; }
.franja-sesion__txt { margin: 0; font-size: 12.5px; color: var(--suave); min-width: 0; }
.carta-ranking .franja-sesion { margin: 0; padding: 10px 14px; background: var(--papel); border-bottom: 2px solid var(--tinta); }
.aviso-vivo:empty { display: none; }
.orden { list-style: none; margin: 0; padding: 10px 12px 4px; display: grid; gap: 4px; grid-template-columns: minmax(0, 1fr); }
.orden__item { position: relative; min-width: 0; font-size: 12.5px; background: #fff; border: 2px solid rgba(30, 18, 48, .45); border-radius: 8px; overflow: hidden; }
.orden__item.ok { background: var(--verde-claro); border-color: var(--verde); }
.orden__btn { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; min-height: 44px; padding: 6px 8px 6px 10px; }
.orden__p { flex: none; width: 26px; font-weight: 700; color: var(--suave); }
.orden__cod { flex: none; }
.orden__ape { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--suave); }
.orden__ok { flex: none; font-weight: 700; color: var(--verde-osc); }
.leyenda { margin: 8px 0 0; padding: 0; font-size: 12px; color: var(--suave); }
.carta-ranking .leyenda, .carta-orden .leyenda { padding: 10px 14px 12px; margin: 0; }
.resumen-tu { margin: 0; padding: 12px 14px; font-weight: 700; font-size: 14px; background: var(--cempa-claro); border-bottom: 2px solid var(--tinta); }

.puntaje { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.puntaje li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.puntaje__n { font-weight: 700; overflow-wrap: anywhere; }
.puntaje__pts b { font-family: var(--f-titulo); font-weight: 400; font-size: 30px; color: var(--rosa-boton); }
.puntaje__pts small { color: var(--suave); }

.espera { text-align: center; padding: 8px 8px 16px; }
.espera-chica { padding: 12px 14px 4px; }
.espera__t { margin: 6px 0 4px; font-family: var(--f-titulo); font-size: 23px; color: var(--morado-osc); }
.espera__s { margin: 0 auto; max-width: 34ch; font-size: 13.5px; color: var(--suave); }
.carga .ilu-carga { margin-bottom: 4px; }

.ilu { position: relative; display: grid; place-items: center; min-width: 0; overflow: hidden; }
.ilu__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.ilu__emoji { font-size: 56px; line-height: 1; }
.ilu-espera { width: min(100%, 150px); aspect-ratio: 1; margin: 0 auto; }
.ilu-carga { width: 120px; aspect-ratio: 1; margin: 0 auto; }
.ilu-chica { width: 54px; aspect-ratio: 1; flex: none; margin: 0 auto; }
.ilu-tuto { aspect-ratio: 420 / 320; width: 100%; background: linear-gradient(180deg, #FFE0A8, var(--lila)); border-bottom: 2px solid var(--tinta); }
.ilu-invita { width: 120px; aspect-ratio: 1; margin: 0 auto 6px; }

/* Mi pronóstico */
.mia-resumen { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px dashed var(--linea); }
.mia-resumen__n { font-family: var(--f-titulo); font-weight: 400; font-size: 46px; line-height: 1; color: var(--rosa-boton); }
.mia-resumen span { font-size: 13px; color: var(--suave); font-weight: 600; }
.mia-resumen__l { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: var(--lila); border: 2px solid var(--morado); color: var(--tinta) !important; }
.mia-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mia-fila { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: 'p mi pts' 'p real real'; align-items: center; gap: 2px 8px; padding: 8px 10px; font-size: 12.5px; background: #fff; border: 2px solid rgba(30, 18, 48, .45); border-radius: 10px; }
.mia-fila.ok { background: var(--verde-claro); border-color: var(--verde); }
.mia-fila__p { grid-area: p; align-self: start; padding-top: 2px; font-weight: 700; color: var(--suave); }
.mia-fila__mi { grid-area: mi; min-width: 0; }
.mia-fila__real { grid-area: real; color: var(--suave); font-size: 12px; }
.mia-fila__real b { color: var(--tinta); }
.mia-fila__pts { grid-area: pts; min-width: 3ch; text-align: right; font-weight: 700; font-size: 14px; color: var(--verde-osc); }

/* ───────────── Grupo ───────────── */
.grupo-cab { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 12px; }
.grupo-cab__txt { min-width: 0; }
.etiqueta { display: inline-block; margin-top: 6px; padding: 2px 10px; font-size: 11.5px; font-weight: 700; border-radius: 999px; border: 2px solid var(--tinta); }
.etiqueta-aviso { background: var(--cempa-claro); }
.codigo-grande { margin: 0 0 4px; text-align: center; font-family: var(--f-titulo); font-size: clamp(38px, 12vw, 50px); letter-spacing: .08em; color: var(--rosa-boton); text-shadow: 2px 2px 0 var(--tinta); }
.compartir { display: grid; gap: 10px; margin-top: 10px; }
.compartir__fila { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.compartir__fila.con-hoja { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compartir__fila .btn { flex-direction: column; gap: 3px; min-height: 62px; padding: 8px 4px; font-size: 12.5px; }
.compartir__fila .btn svg { stroke: currentColor; }
.dialogo-qr .dialogo__caja { text-align: center; }
.qr__lienzo { display: grid; place-items: center; width: min(100%, 280px); aspect-ratio: 1; margin: 0 auto 10px; padding: 8px; background: #fff; border: 2px solid var(--tinta); border-radius: 14px; }
.qr__svg { display: block; width: 100%; height: 100%; }
.qr__espera { margin: 0; font-size: 13px; color: var(--suave); }
.qr__codigo { margin: 0 0 12px; font-size: 14px; }
.qr__codigo b { font-family: var(--f-titulo); font-weight: 400; font-size: 26px; letter-spacing: .06em; color: var(--rosa-boton); }

.envios { list-style: none; margin: 0; padding: 10px 12px 4px; display: grid; gap: 6px; }
.envio { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; padding: 5px 10px 5px 8px; background: #fff; border: 2px solid rgba(30, 18, 48, .35); border-radius: 10px; font-size: 14px; }
.envio.ok { border-color: var(--verde); background: var(--verde-claro); }
.envio.yo { box-shadow: inset 4px 0 0 var(--cempa); }
.envio__n { min-width: 0; font-weight: 700; overflow-wrap: anywhere; line-height: 1.2; }
.envio__n em { margin-left: 6px; font-style: normal; font-weight: 500; font-size: 12px; color: var(--suave); }
.envio__e { font-size: 12.5px; font-weight: 700; white-space: nowrap; color: var(--suave); }
.envio.ok .envio__e { color: var(--verde-osc); }
.carta__pie-accion { padding: 10px 12px 14px; }

.ranking { list-style: none; margin: 0; padding: 0; position: relative; }
.fila { position: relative; background: var(--tarjeta); border-bottom: 1px dashed var(--linea); }
.fila:last-child { border-bottom: 0; }
.fila__cab {
  appearance: none; -webkit-appearance: none; display: grid; grid-template-columns: 30px 36px minmax(0, 1fr) auto; align-items: center; column-gap: 8px;
  width: 100%; min-height: 54px; margin: 0; padding: 8px 10px; text-align: left; font: inherit; color: inherit;
  background: transparent; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.fila__cab:focus-visible { outline-offset: -3px; }
.fila.moviendo { z-index: 3; box-shadow: 0 6px 14px -4px rgba(30, 18, 48, .4); }
.fila.yo { background: #FFF1D6; box-shadow: inset 5px 0 0 var(--cempa); }
.fila.moviendo.yo { box-shadow: inset 5px 0 0 var(--cempa), 0 6px 14px -4px rgba(30, 18, 48, .4); }
.fila.top-1 { background: linear-gradient(90deg, #FFE9A8, var(--tarjeta) 85%); }
.fila.top-1.yo { background: linear-gradient(90deg, #FFDC7A, #FFF1D6 85%); }
.fila.abierta { background: #FFF8EA; }
.fila.yo.abierta { background: #FFEBC2; }
.fila.ultimo { background: #F3ECF9; }
.fila__lugar { display: grid; justify-items: center; line-height: 1; }
.fila__num { font-family: var(--f-titulo); font-size: 22px; color: var(--morado); white-space: nowrap; }
.flecha { margin-top: 2px; font-size: 11px; font-weight: 700; }
.flecha.sube { color: var(--verde-osc); }
.flecha.baja { color: var(--rojo-txt); }
.fila__avatar { position: relative; display: block; width: 36px; height: 36px; }
.fila__medalla { position: absolute; top: -8px; left: -8px; font-size: 15px; line-height: 1; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .25)); }
.fila__info { display: grid; gap: 4px; min-width: 0; }
.fila__nombre { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.2; }
.fila__nombre-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila__nombre em { flex: none; font-style: normal; font-weight: 500; font-size: 12px; color: var(--suave); }
.fila .puntitos { gap: 3px; }
.fila .puntitos i { width: 9px; height: 9px; border-width: 1.5px; }
.fila__pts { display: grid; justify-items: end; min-width: 34px; line-height: 1.05; }
.fila__pts b { font-size: 20px; font-variant-numeric: tabular-nums; }
.fila__pts small { font-size: 11px; font-weight: 600; color: var(--suave); }
.fila__pts small.lider { color: var(--cempa-txt); }

.det { padding: 0 10px 12px; background: rgba(251, 233, 208, .45); border-top: 1px dashed var(--linea); }
.det__lista { list-style: none; margin: 0; padding: 8px 0 0; display: grid; gap: 4px; }
.det__fila { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 6px; min-height: 32px; padding: 2px 8px 2px 6px; font-size: 12.5px; background: #fff; border: 1.5px solid rgba(30, 18, 48, .3); border-radius: 8px; }
.det__fila.ok { background: var(--verde-claro); border-color: var(--verde); }
.det__p { font-weight: 700; color: var(--suave); }
.det__piloto { min-width: 0; }
.det__res { min-width: 44px; text-align: right; font-weight: 700; white-space: nowrap; }
.det__res.bien { color: var(--verde-osc); }
.det__res.mal { color: var(--rojo-txt); }
.det__va { min-width: 48px; text-align: right; font-size: 12px; color: #6D5F7C; white-space: nowrap; }

/* Tabla «Pronósticos de todos» */
.carta-tabla .carta__cuerpo, .carta-dice .carta__cuerpo { padding: 12px; }
.tabla-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; border: 2px solid var(--tinta); border-radius: 10px; background: #fff; }
.tq { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 12.5px; }
.tq th, .tq td { padding: 0; border-bottom: 1px solid var(--linea); }
.tq thead th { padding: 6px 4px; min-width: 54px; text-align: center; font-size: 12px; color: var(--papel); background: var(--morado-osc); }
.tq thead th small { display: block; font-size: 10.5px; font-weight: 500; color: #FFD27A; }
.tq .sticky { position: sticky; left: 0; z-index: 2; width: 112px; min-width: 112px; max-width: 112px; text-align: left; font-weight: 600; background: var(--tarjeta); border-right: 2px solid var(--tinta); }
.tq thead .sticky { background: var(--morado-osc); padding-left: 8px; z-index: 3; }
.tq-jug { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 5px 6px; }
.tq-jug__n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tq-flag { width: 26px; text-align: center; }
.celda { position: relative; min-width: 54px; text-align: center; font-weight: 700; box-shadow: inset 0 -3px 0 var(--eq); border-left: 1px solid var(--linea); white-space: nowrap; }
.celda.ok { background: var(--verde-claro); color: #064A2C; }
.celda.ok .celda__cod::after { content: ' ✓'; font-weight: 700; }
.tq-pista .sticky, .tq-pista .celda { background: var(--cempa-claro); }
.tq tr.yo .sticky { background: #FFF1D6; }
.tq tr.yo .celda:not(.ok) { background: #FFF8EA; }

.dice { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dice__fila { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 16px; align-items: center; gap: 8px; min-height: 36px; padding: 3px 8px; font-size: 12.5px; background: #fff; border: 2px solid rgba(30, 18, 48, .35); border-radius: 8px; }
.dice__fila.ok { background: var(--verde-claro); border-color: var(--verde); }
.dice__p { font-weight: 700; color: var(--suave); }
.dice__cods { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.dice__n { font-weight: 600; white-space: nowrap; }
.dice__n small, .dice__cods small { font-weight: 500; color: var(--suave); }
.dice__ok { font-weight: 700; color: var(--verde-osc); text-align: center; }

/* Integrantes y herramientas */
.miembros { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.miembro { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; }
.miembro__info { display: grid; min-width: 0; gap: 1px; }
.miembro__n { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.miembro__n em { margin-left: 6px; font-style: normal; font-weight: 500; font-size: 12px; color: var(--suave); }
.miembro__e { font-size: 11.5px; color: var(--suave); white-space: pre-wrap; }
.herramientas { display: grid; gap: 8px; }
.grupo-pie { display: grid; gap: 8px; justify-items: center; margin: 0 0 16px; }
.grupo-pie .btn { width: 100%; }

/* Invitación */
.invita { text-align: center; margin: 0 0 14px; }
.invita__sup { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); }
.invita__t { margin: 0 0 6px; font-size: 32px; line-height: 1.08; overflow-wrap: anywhere; outline: none; }
.invita__s { margin: 0 auto; max-width: 34ch; font-size: 13.5px; color: var(--suave); }

/* Ranking nacional */
.nacional { list-style: none; margin: 0; padding: 0; }
.nac { display: grid; grid-template-columns: 34px 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border-bottom: 1px dashed var(--linea); }
.nac:last-child { border-bottom: 0; }
.nac.yo { background: #FFF1D6; box-shadow: inset 5px 0 0 var(--cempa); }
.nac__pos { font-family: var(--f-titulo); font-size: 19px; text-align: center; color: var(--morado); }
.nac__n { min-width: 0; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nac__pts b { font-size: 17px; }
.nac__pts small { color: var(--suave); }

/* Familia */
.familia { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 14px; }
.fam { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--linea); }
.fam:last-child { padding-bottom: 0; border-bottom: 0; }
.fam__info { min-width: 0; }
.fam__n { margin: 0 0 2px; font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.fam__n em { margin-left: 6px; font-style: normal; font-weight: 500; font-size: 12px; color: var(--suave); }
.fam__e { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 8px; font-size: 12.5px; color: var(--suave); }
.fam__e .ok { color: var(--verde-osc); font-weight: 700; }
.fam__acc { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-borrar { color: var(--rojo-txt); }

/* ───────────── Perfil ───────────── */
.perfil-cab { display: flex; align-items: center; gap: 16px; margin: 0 0 16px; min-width: 0; }
.perfil-cab__foto { flex: none; }
.perfil-cab__datos { min-width: 0; }
.perfil-cab__datos p { margin: 3px 0 0; font-size: 13px; }
.perfil-cab__nombre { margin: 0; font-family: var(--f-titulo); font-weight: 400; font-size: 31px; line-height: 1.05; color: var(--morado-osc); overflow-wrap: anywhere; }
.perfil-cab__correo { color: var(--suave); overflow-wrap: anywhere; }
.mis-q { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.mis-q__item { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px dashed var(--linea); }
.mis-q__item:last-child { padding-bottom: 0; border-bottom: 0; }
.mis-q__t { margin: 0; font-weight: 700; }
.enlaces-lista { list-style: none; margin: 0; padding: 0; display: grid; }
.enlaces-lista a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-weight: 600; text-decoration: none; border-bottom: 1px dashed var(--linea); }
.enlaces-lista li:last-child a { border-bottom: 0; }
.vista-perfil > .btn-peligro { margin: 4px 0 12px; }

/* ───────────── Tutorial ───────────── */
.tuto__cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.tuto__cab .vista-titulo { margin: 0; font-size: 27px; }
.tuto__pista { position: relative; display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 6px 8px 2px; margin: 0 -2px; overscroll-behavior-x: contain; }
.tuto__pista::-webkit-scrollbar { display: none; }
.tuto__tarjeta { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; display: flex; }
.tuto__carta { margin: 0; width: 100%; display: flex; flex-direction: column; }
.tuto__carta .carta__cuerpo { flex: 1; }
.tuto__titulo { margin: 0 0 8px; font-size: 26px; line-height: 1.08; }
.tuto__carta p { margin: 0 0 10px; font-size: 14.5px; }
.tuto__controles { position: sticky; z-index: 5; bottom: calc(var(--h-dock) + 8px); margin: 6px 0 12px; padding: 8px 10px; display: grid; gap: 8px; background: var(--tarjeta); border: 2px solid var(--tinta); border-radius: 14px; box-shadow: 4px 4px 0 var(--sombra); }
.tuto__puntos { display: flex; justify-content: center; gap: 0; }
.tuto__punto { appearance: none; display: grid; place-items: center; width: 40px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.tuto__punto i { width: 11px; height: 11px; border-radius: 50%; background: transparent; border: 2px solid var(--tinta); transition: transform .15s ease, background .15s ease; }
.tuto__punto.activo i { background: var(--rosa-boton); transform: scale(1.35); }
.tuto__botones { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }

.ejemplo { margin: 10px 0 4px; padding: 10px 12px; background: var(--lila); border: 2px solid var(--morado); border-radius: 10px; font-size: 13.5px; }
.ejemplo p { margin: 0 0 6px !important; font-size: 13.5px !important; }
.ejemplo p:last-child { margin-bottom: 0 !important; }
.ejemplo__t { font-size: 11.5px !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--morado); }
.ejemplo__suma { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-weight: 600; }
.ejemplo__suma span { padding: 1px 8px; background: #fff; border: 1.5px solid var(--morado); border-radius: 6px; }
.ej-cabeza, .ej-fila { display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; align-items: center; gap: 8px; margin: 0 0 6px; }
.ej-cabeza__p { display: flex; gap: 4px; }
.ej-cabeza__p em { width: 13px; font-style: normal; font-size: 8.5px; font-weight: 700; text-align: center; letter-spacing: -.04em; }
.ej-fila__n { font-size: 13px; }
.ej-fila__t { font-weight: 700; text-align: right; }

/* ───────────── Textos legales ───────────── */
.carta-legal .carta__cuerpo { padding: 16px 16px 20px; }
.md { font-size: 14px; line-height: 1.55; }
.md h1 { margin: 0 0 8px; font-family: var(--f-titulo); font-weight: 400; font-size: 27px; line-height: 1.1; color: var(--morado-osc); outline: none; }
.md h2 { margin: 22px 0 6px; padding-top: 14px; font-family: var(--f-titulo); font-weight: 400; font-size: 21px; line-height: 1.15; color: var(--morado); border-top: 2px dashed var(--linea); }
.md h3, .md h4 { margin: 16px 0 4px; font-size: 14.5px; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 1.3em; }
.md li { margin-bottom: 4px; }
.md li > ul { margin: 4px 0 0; }
.md blockquote { margin: 0 0 12px; padding: 10px 12px; font-weight: 600; background: var(--cempa-claro); border-left: 5px solid var(--cempa); border-radius: 0 10px 10px 0; }
.md blockquote p { margin: 0; }
.md hr { margin: 16px 0; border: 0; border-top: 2px dashed var(--linea); }
.md a { color: var(--morado); font-weight: 600; overflow-wrap: anywhere; }
.md code { padding: 0 4px; font-size: .92em; background: var(--lila); border-radius: 4px; }
.md-tabla { max-width: 100%; margin: 0 0 12px; overflow-x: auto; border: 2px solid var(--tinta); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.md-tabla table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 13px; }
.md-tabla th, .md-tabla td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--linea); vertical-align: top; }
.md-tabla thead th { color: var(--papel); background: var(--morado-osc); }
.md-tabla tbody th { font-weight: 700; white-space: nowrap; }
.carta-resumen .carta__cuerpo p { font-size: 14px; }

/* Pie legal: va al final de TODAS las pantallas */
.pie-legal { margin: 8px 0 0; padding: 14px 4px 10px; text-align: center; border-top: 2px dashed var(--linea); }
.pie-legal__txt { margin: 0 0 8px; font-size: 11px; line-height: 1.5; color: var(--suave); text-wrap: pretty; }
.pie-legal__enlaces { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; }
.pie-legal__enlaces a { display: inline-flex; align-items: center; min-height: 36px; font-size: 12px; font-weight: 600; color: var(--morado); }

/* ───────────── Panel del equipo ───────────── */
.admin-paneles { display: grid; }
.sh-info { margin-bottom: 4px; }
.sh-orden { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.sh-fila { position: relative; display: flex; align-items: center; gap: 4px; min-width: 0; padding-right: 2px; background: #fff; border: 2px solid rgba(30, 18, 48, .45); border-radius: 8px; touch-action: manipulation; }
.sh-fila.corte { margin-bottom: 8px; border-bottom: 4px solid var(--cempa); }
.sh-fila.arrastrando { z-index: 5; background: var(--lila); border-color: var(--rosa); box-shadow: 0 8px 18px -6px rgba(30, 18, 48, .5); transition: none; }
.sh-asa { appearance: none; flex: none; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--morado); font-size: 22px; line-height: 1; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; }
.sh-asa:active { cursor: grabbing; }
.sh-fila__pos { flex: none; width: 28px; font-size: 12px; color: var(--suave); }
.sh-fila__n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--suave); }
.sh-fila .chip-p { flex: none; }
.sh-botones { display: grid; gap: 10px; margin: 8px 0 4px; }
.sh-horarios { display: grid; gap: 14px; }
.sh-horarios .btn { justify-self: start; }
.sh-json-caja { max-width: 100%; margin-bottom: 10px; border: 2px solid var(--tinta); border-radius: 8px; background: #17101F; overflow: hidden; }
.sh-json { margin: 0; padding: 10px; max-height: 240px; overflow: auto; font-size: 11.5px; line-height: 1.4; color: #E8F2DE; white-space: pre; }
.sh-pilotos { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

/* ───────────── Carga ───────────── */
.carga { display: grid; place-items: center; gap: 10px; padding: 14vh 0 4vh; text-align: center; color: var(--suave); font-weight: 600; }
.carga p { margin: 0; max-width: 32ch; }
.carga .ilu-carga .ilu__emoji { animation: parpadeo 1.6s ease-in-out infinite; }
@keyframes parpadeo { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.92); } }

/* ───────────── Pie fijo + barra de pestañas ───────────── */
#dock { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; }
.powered {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--h-powered);
  font-size: 11px; color: var(--suave);
  background: var(--papel); border-top: 2px solid var(--tinta);
}
.powered img { display: block; height: 13px; width: auto; }
body.sin-nav .powered { height: calc(var(--h-powered) + var(--safe-b)); padding-bottom: var(--safe-b); }
#tabs {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--h-tabs) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--morado-osc);
  border-top: 3px solid var(--tinta);
}
body.sin-nav #tabs { display: none; }
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 0; min-height: 44px; padding: 4px 2px;
  color: #E9DAF6; font-size: 11px; font-weight: 600; text-decoration: none; line-height: 1.1;
  -webkit-tap-highlight-color: transparent;
}
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tab__txt { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab[aria-current='page'] { color: var(--cempa); background: rgba(0, 0, 0, .25); box-shadow: inset 0 3px 0 var(--cempa); }
.tab:focus-visible { outline-color: #fff; outline-offset: -4px; }
.tab__punto { position: absolute; top: 6px; left: calc(50% + 6px); width: 10px; height: 10px; border-radius: 50%; background: var(--rosa); border: 2px solid var(--morado-osc); }

/* ───────────── Avisos y diálogo ───────────── */
#toasts { position: fixed; z-index: 90; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 22px); display: grid; gap: 8px; justify-items: center; padding: 0 14px; pointer-events: none; }
.toast { max-width: 420px; padding: 11px 16px; font-size: 14px; font-weight: 600; line-height: 1.3; text-align: center; color: var(--papel); background: var(--morado-osc); border: 2px solid var(--cempa); border-radius: 12px; box-shadow: 0 6px 16px rgba(30, 18, 48, .4); animation: entra .25s ease-out; overflow-wrap: anywhere; }
.toast-error { background: #7A0B1D; border-color: #FBD0D8; color: #fff; }
.toast.sale { opacity: 0; transform: translateY(-8px); transition: opacity .3s ease, transform .3s ease; }
@keyframes entra { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.dialogo { width: min(calc(100vw - 32px), 400px); max-height: calc(100dvh - 32px); padding: 0; border: 0; background: transparent; color: var(--tinta); overflow: visible; }
.dialogo::backdrop { background: rgba(30, 18, 48, .66); }
.dialogo__caja { max-height: calc(100dvh - 32px); overflow-y: auto; padding: 18px 16px 16px; background: var(--tarjeta); border: 2px solid var(--tinta); border-radius: 16px; box-shadow: 6px 6px 0 var(--sombra); }
.dialogo__titulo { margin: 0 0 8px; font-family: var(--f-titulo); font-weight: 400; font-size: 25px; line-height: 1.1; color: var(--morado-osc); overflow-wrap: anywhere; }
.dialogo__texto { margin: 0 0 14px; font-size: 14px; }
.dialogo__acciones { display: grid; gap: 10px; }
.dialogo .campo { margin-bottom: 14px; }

/* ───────────── Pantallas más anchas ───────────── */
@media (min-width: 700px) {
  :root { --ancho: 600px; }
  #vista { padding-top: 40px; }
  #tabs, .powered, .barra-guardar { max-width: var(--ancho); margin-left: auto; margin-right: auto; }
  #tabs { border-radius: 14px 14px 0 0; border-left: 3px solid var(--tinta); border-right: 3px solid var(--tinta); }
  .powered { background: transparent; border-top: 0; }
}
@media (max-width: 359px) {
  .vista-titulo { font-size: 26px; }
  .saludo__t { font-size: 27px; }
  .fila__cab { column-gap: 6px; padding-inline: 8px; }
  .letrero { padding-inline: 34px; }
  .barra-guardar .btn { min-width: 96px; padding-inline: 10px; }
  .pregunta__op { grid-template-columns: minmax(0, 1fr); }
}

/* ───────────── Movimiento reducido ───────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .pill__punto { animation: none; }
}

.gracias p, .espera__s, .portada__lema { text-wrap: balance; }
.cab-con-icono { display: flex; align-items: center; gap: 12px; }

/* Enlaces que se tocan con el dedo: área de 44 px */
.tuto__cab .enlace, .mis-q__item .enlace, .enlace-chico { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
.mis-q__item .enlace { justify-self: start; padding-left: 0; }
.form-nota .enlace { min-height: 32px; }

/* ───────────── Botones que abren la ficha de un piloto ───────────── */
.pbtn { appearance: none; -webkit-appearance: none; cursor: pointer; background: transparent; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; -webkit-tap-highlight-color: transparent; }
.pbtn:focus-visible { outline-offset: -3px; }
.celda__btn { display: grid; place-items: center; width: 100%; min-height: 44px; padding: 0 3px; font-weight: 700; text-align: center; }
.celda > .celda__cod { display: block; padding: 14px 3px; }
.mia-fila__btn { display: block; max-width: 100%; min-height: 32px; }
.ic-info span { display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid currentColor; border-radius: 50%; font: italic 700 14px/1 var(--f-cuerpo); }
.ic-info { color: var(--rosa-boton); }

/* ───────────── Ficha del piloto (hoja inferior) ───────────── */
html.hoja-abierta { overflow: hidden; }
.hoja { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-width: var(--ancho); height: auto; max-height: none; margin: 0 auto; padding: 0; border: 0; background: transparent; color: var(--tinta); overflow: visible; }
.hoja::backdrop { background: rgba(30, 18, 48, .66); animation: velo .2s ease-out; }
.hoja__caja {
  position: relative; display: flex; flex-direction: column; max-height: 92vh; max-height: 92dvh;
  background-color: var(--papel); background-image: radial-gradient(rgba(255, 138, 0, .15) 1.2px, transparent 1.7px); background-size: 14px 14px;
  border: 2px solid var(--tinta); border-bottom: 0; border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
  animation: sube .28s cubic-bezier(.2, .8, .2, 1);
}
.hoja.saliendo .hoja__caja { transform: translateY(105%); transition: transform .22s ease-in; }
.hoja.saliendo::backdrop { opacity: 0; transition: opacity .22s; }
.hoja__arrastre { flex: none; display: grid; place-items: center; height: 30px; cursor: grab; touch-action: none; }
.hoja__asa { width: 52px; height: 5px; border-radius: 3px; background: var(--morado); }
.hoja__x { position: absolute; top: 4px; right: 4px; z-index: 3; font-size: 18px; background: var(--tarjeta); border: 2px solid var(--tinta); border-radius: 50%; width: 44px; height: 44px; }
.hoja__cuerpo { flex: 1 1 auto; min-height: 0; padding: 0 16px 16px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; outline: none; }
.hoja__pie { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 16px calc(10px + var(--safe-b)); background: var(--papel-2); border-top: 2px solid var(--tinta); }
.hoja__pie.solo { grid-template-columns: minmax(0, 1fr); }
.hoja__pie .btn { min-height: 52px; font-size: 15px; }
.hoja__pie .btn-sec { min-width: 92px; }
@keyframes sube { from { transform: translateY(100%); } to { transform: none; } }
@keyframes velo { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hoja__caja, .hoja::backdrop { animation: none; } }

.fp-cab { display: flex; align-items: flex-start; gap: 14px; padding: 2px 46px 4px 0; }
.fp-num { flex: none; display: grid; place-items: center; width: 76px; height: 76px; background: var(--eq); color: var(--eq-t); border: 2px solid var(--tinta); border-radius: 16px; box-shadow: 0 3px 0 var(--sombra); }
.fp-num b { font-family: var(--f-titulo); font-weight: 400; font-size: 46px; line-height: 1; }
.fp-id { min-width: 0; }
.fp-nombre { margin: 0; font-family: var(--f-titulo); font-weight: 400; font-size: 24px; line-height: 1.1; color: var(--morado-osc); overflow-wrap: anywhere; outline: none; }
.fp-linea { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 3px 0 0; font-size: 13px; min-width: 0; }
.fp-equipo i { flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--eq); border: 1.5px solid rgba(30, 18, 48, .6); }
.fp-equipo { gap: 6px; font-weight: 600; }
.fp-cod { padding: 0 6px; font-size: 11px; font-weight: 700; color: var(--suave); border: 1.5px solid var(--linea); border-radius: 6px; }
.fp-datos { color: var(--suave); }
.fp-datos b { color: var(--tinta); }
.fp-datos span + span::before { content: '·'; margin-right: 8px; color: var(--suave); }
.fp-sec { margin: 16px 0 0; }
.fp-sec__t { margin: 0 0 8px; padding-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); border-bottom: 2px dashed var(--linea); }
.fp-tiles { display: grid; gap: 6px; }
.fp-tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fp-tile { display: grid; justify-items: center; align-content: center; gap: 1px; min-width: 0; min-height: 58px; padding: 6px 2px; text-align: center; background: #fff; border: 2px solid rgba(30, 18, 48, .45); border-radius: 10px; }
.fp-tile small { font-size: 10.5px; font-weight: 600; color: var(--suave); }
.fp-tile b { font-size: 18px; line-height: 1.15; }
.fp-tile.vacio b { font-weight: 500; color: #9A8CAA; }
.fp-texto { margin: 8px 0 0; font-size: 14px; line-height: 1.5; }
.fp-nota { margin: 8px 0 0; font-size: 11.5px; color: var(--suave); }
.fp-aviso { margin: 16px 0 0; padding: 10px 12px; font-size: 13px; color: var(--suave); background: var(--papel-2); border: 2px dashed var(--linea); border-radius: 10px; }
