/* Ronda del 15-11 (notas 231 a 261): frente barra. */

/* ============================================================ Notas 260 y 261: barra izquierda ordenada */
/* Tarjeta, Calculadora, Ficha y Más, cada uno con su ícono y un nombre corto debajo (en la tableta no hay globo al
   pasar el cursor); la persona al final del grupo. Mismo vidrio inclinado de siempre. */
.barra .barra-izq { gap: 6px; flex-wrap: nowrap; min-width: 0; }
.barra .barra-izq .b-nombre { width: auto; min-width: 54px; height: 56px; padding: 0 9px !important; display: inline-grid; grid-auto-flow: row;
  place-items: center; align-content: center; gap: 4px; }
.barra .barra-izq .b-nombre .ico { width: 20px; height: 20px; }
.barra .corto { display: block; font: 700 11px/1 var(--cuerpo, "Nunito Sans", sans-serif); letter-spacing: 0; white-space: nowrap; color: inherit; opacity: .86; }
.barra .b-nombre[aria-pressed="true"] .corto, .barra .b-nombre[aria-expanded="true"] .corto { opacity: 1; }
.barra .b-nombre[aria-expanded="true"]::before { background: rgba(255, 255, 255, .2); }
.barra .barra-izq > .lado.izq { margin-left: 4px; }
/* El nombre corto ya dice qué es: el globo solo queda en los que suman algo (atajo de teclado). */
.barra #tarjeta-asesor[data-tip]::after, .barra #ver-ficha[data-tip]::after { display: none; }

/* Menú «Más» (barra-mas.js): vidrio oscuro como el menú de la persona. */
.barra-mas { position: relative; display: inline-flex; }
.barra-mas-menu { position: absolute; left: 0; top: calc(100% + 8px); z-index: 62; display: grid; gap: 2px; min-width: 250px; padding: 6px; border-radius: 12px;
  background: rgba(18, 20, 24, .94); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 24px 50px -20px rgba(0, 0, 0, .9);
  animation: mas-entra .22s cubic-bezier(.32, .72, 0, 1); }
.barra-mas-menu[hidden] { display: none; }
.barra-mas-menu.sube { top: auto; bottom: calc(100% + 8px); }
.barra-mas-menu button { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border: 0; border-radius: 8px; cursor: pointer; text-align: left;
  color: #f4f5f7; background: none; font: 700 14px/1.2 var(--cuerpo, "Nunito Sans", sans-serif); white-space: nowrap; }
.barra-mas-menu button:hover, .barra-mas-menu button:focus-visible { background: rgba(255, 255, 255, .09); outline: 0; }
.barra-mas-menu .ico { width: 20px; height: 20px; flex: none; opacity: .85; }
@keyframes mas-entra { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
/* Atajos de teclado solo donde hay teclado y mouse. */
@media (hover: none), (pointer: coarse) { .barra-mas-menu #ver-atajos { display: none; } }

/* Celular acostado: barra baja (52 px); íconos y nombres un poco más pequeños. */
@media (orientation: landscape) and (max-height: 500px) {
  .barra .barra-izq { gap: 4px; }
  .barra .barra-izq .b-nombre { height: 48px; min-width: 48px; padding: 0 7px !important; gap: 3px; }
  .barra .barra-izq .b-nombre .ico { width: 18px; height: 18px; }
  .barra .corto { font-size: 10px; }
}
/* PC o tableta acostada angosta (hasta 1100 px): la búsqueda cede el espacio. */
@media (orientation: landscape) and (max-width: 1100px) { .barra .barra-izq .b-nombre { padding: 0 7px !important; } }

/* Tableta de pie: la barra va abajo con el grupo completo a la izquierda, el precio y «Cotizar» a la derecha. */
@media (orientation: portrait) and (max-width: 1023px) {
  #barra .barra-izq > * { display: inline-flex; }
  #barra .barra-izq > .b-nombre { display: inline-grid; }
  .barra .barra-izq .b-nombre { height: 54px; }
  .barra-mas-menu { top: auto; bottom: calc(100% + 8px); }
  .barra .barra-precio { justify-self: end; }
  /* La búsqueda queda más angosta: el texto de ayuda termina en «…» en vez de cortarse. */
  #barra .barra-buscar input { text-overflow: ellipsis; }
}
/* De pie y angosto (menos de 700 px): solo íconos. */
@media (orientation: portrait) and (max-width: 699px) {
  .barra .corto { display: none; }
  .barra .barra-izq .b-nombre { width: 44px; min-width: 44px; height: 44px; padding: 0 !important; }
  .barra .barra-izq { gap: 2px; }
}

/* ============================================================ Nota 238: tarjeta digital del asesor (tarjeta-asesor.js) */
.tj-velo { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; overflow: auto;
  background: rgba(5, 6, 8, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tj-velo[hidden] { display: none; }
.tj-caja { position: relative; width: min(760px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 16px;
  border-radius: 16px; color: #f4f5f7; background: rgba(16, 18, 22, .92); -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .06), 0 40px 80px -30px rgba(0, 0, 0, .95);
  font-family: var(--cuerpo, "Nunito Sans", sans-serif); }
.tj-velo.ver .tj-caja { animation: tj-humo .5s cubic-bezier(.22, .8, .24, 1) backwards; }
@keyframes tj-humo { 0% { opacity: 0; filter: blur(16px); transform: translateY(10px) scale(.96); } 55% { opacity: 1; filter: blur(3px); } 100% { opacity: 1; filter: none; transform: none; } }
.tj-cerrar { position: absolute; top: 10px; right: 10px; z-index: 2; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 9px; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, .08); }
.tj-cerrar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* La tarjeta: foto o iniciales, nombre, cargo, WhatsApp, el QR y el logo. */
.tj-tarjeta { display: grid; justify-items: center; align-content: start; gap: 12px; padding: 18px 16px 16px; border-radius: 12px; text-align: center;
  background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(255, 255, 255, .09), rgba(255, 255, 255, 0) 70%), rgba(255, 255, 255, .04); }
.tj-quien { display: flex; align-items: center; gap: 14px; text-align: left; max-width: 100%; }
.tj-foto { flex: none; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--acento, #d71f30);
  color: var(--sobre-acento, #fff); box-shadow: 0 0 0 3px rgba(255, 255, 255, .14); }
.tj-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tj-foto span { font: italic 800 26px/1 var(--titulo, Montserrat, sans-serif); }
.tj-datos { display: grid; gap: 3px; min-width: 0; }
.tj-datos h2 { margin: 0; font: italic 800 20px/1.15 var(--titulo, Montserrat, sans-serif); overflow-wrap: break-word; }
.tj-datos small { font-size: 13.5px; color: rgba(255, 255, 255, .68); }
.tj-datos b { font: 700 15px/1.2 var(--cuerpo, sans-serif); font-variant-numeric: tabular-nums; }
.tj-qr { padding: 10px; border-radius: 10px; background: #fff; }
.tj-qr svg { display: block; width: 180px; height: 180px; }
.tj-pie, .tj-sin { margin: -4px 0 0; font-size: 12.5px; font-weight: 700; color: rgba(255, 255, 255, .6); }
.tj-sin { margin: 8px 0; }
.tj-logo { width: 116px; height: auto; opacity: .9; }

/* Envío: número del cliente con teclado propio (nunca abre el teclado del sistema). */
.tj-enviar { display: grid; align-content: start; gap: 10px; padding: 6px 2px 0; }
.tj-rotulo { display: flex; align-items: center; min-height: 40px; margin: 0; padding-right: 50px; font: 700 14px/1.3 var(--cuerpo, sans-serif); color: rgba(255, 255, 255, .75); }
.tj-numero { display: block; min-height: 56px; padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, .07); text-align: center;
  font: 700 28px/32px var(--titulo, sans-serif); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.tj-numero.vacio { color: rgba(255, 255, 255, .28); }
.tj-numero.listo { box-shadow: inset 0 -2px 0 var(--acento, #d71f30); }
.tj-teclas { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 52px; gap: 7px; }
.tj-teclas button { display: grid; place-items: center; border: 0; border-radius: 10px; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .09);
  font: 700 24px/1 var(--titulo, sans-serif); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tj-teclas .tj-fn { background: rgba(255, 255, 255, .17); font-size: 20px; }
.tj-teclas svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tj-principal { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border: 0; border-radius: 10px; cursor: pointer;
  color: var(--sobre-acento, #fff); background: var(--acento, #d71f30); font: 800 16px/1 var(--cuerpo, sans-serif); }
.tj-principal svg { width: 22px; height: 22px; }
.tj-principal:disabled { opacity: .35; cursor: default; }
.tj-sec { min-height: 44px; border: 0; border-radius: 9px; cursor: pointer; color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .06); font: 700 14px/1 var(--cuerpo, sans-serif); }
@media (hover: hover) { .tj-teclas button:hover, .tj-sec:hover, .tj-cerrar:hover { filter: brightness(1.25); } .tj-principal:not(:disabled):hover { background: var(--acento-hondo, #b5121f); } }
.tj-velo .toca { animation: calc-rebote .17s ease-out; }
.tj-velo button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Angosto (celular de pie): una sola columna. */
@media (max-width: 640px) and (orientation: portrait) { .tj-caja { grid-template-columns: 1fr; } }
/* Celular acostado: compacto para que quepa de alto. */
@media (orientation: landscape) and (max-height: 500px) {
  .tj-velo { padding: 8px; }
  .tj-caja { padding: 10px; gap: 10px; width: min(720px, 100%); }
  .tj-tarjeta { gap: 8px; padding: 10px; }
  .tj-foto { width: 52px; height: 52px; } .tj-foto span { font-size: 20px; }
  .tj-datos h2 { font-size: 17px; }
  .tj-qr { padding: 6px; } .tj-qr svg { width: 128px; height: 128px; }
  .tj-logo, .tj-pie { display: none; }
  .tj-enviar { gap: 6px; padding-top: 0; }
  .tj-numero { min-height: 44px; padding: 6px 12px; font-size: 22px; line-height: 30px; }
  .tj-teclas { grid-auto-rows: 44px; gap: 5px; }
  .tj-principal { min-height: 46px; }
  .tj-sec { min-height: 46px; }
  /* «Enviar tarjeta» y «Registrar cliente» lado a lado. */
  .tj-enviar { grid-template-columns: 1fr 1fr; }
  .tj-rotulo, .tj-numero, .tj-teclas, .tj-principal:last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .tj-velo.ver .tj-caja, .tj-velo .toca, .barra-mas-menu { animation: none; } }

/* ============================================================ Nota 281: herramientas rápidas sin marco */
/* «Mismo tamaño para todos en ancho y alto, que el texto no se recorte… sin marco, algo más sencillo, a un toque».
   Tarjeta, Calculadora, Ficha, Más y la persona: misma caja, ícono arriba y nombre completo abajo, sin el vidrio inclinado.
   Al tocar o al estar abierto, solo un fondo suave. La búsqueda cede el espacio para que nada se monte. */
#barra .barra-izq { --hb-ancho: 76px; --hb-alto: 56px; gap: 2px; }
#barra .barra-izq .b-nombre, #barra .barra-izq .quien-b { width: var(--hb-ancho); min-width: var(--hb-ancho); height: var(--hb-alto); padding: 0 !important;
  display: inline-grid; grid-auto-flow: row; place-items: center; align-content: center; gap: 5px; border-radius: 9px; background: none;
  color: #f4f5f7; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); transition: background var(--rapido, .14s); }
#barra .barra-izq .b-nombre::before, #barra .barra-izq .quien-b::before { display: none; }
#barra .barra-izq .b-nombre .ico, #barra .barra-izq .quien-b .ico { width: 22px; height: 22px; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .6)); }
#barra .barra-izq .corto { font-size: 11.5px; opacity: .9; max-width: 100%; }
#barra .barra-izq .quien-b { font-size: 0; }
#barra .barra-izq .quien-b .corto { font-size: 11.5px; overflow: hidden; text-overflow: clip; }
#barra .barra-izq .b-nombre:hover, #barra .barra-izq .quien-b:hover { background: rgba(255, 255, 255, .08); }
#barra .barra-izq .b-nombre[aria-pressed="true"], #barra .barra-izq .b-nombre[aria-expanded="true"], #barra .barra-izq .quien-b[aria-expanded="true"] { background: rgba(255, 255, 255, .14); }
#barra .barra-izq .b-nombre:active, #barra .barra-izq .quien-b:active { transform: scale(.95); }
#barra .barra-izq > .lado.izq { margin-left: 0; }
/* Hasta 1300 px acostado: la columna de la izquierda toma lo que necesita y la búsqueda el resto. */
@media (orientation: landscape) and (max-width: 1300px) {
  #barra { grid-template-columns: auto minmax(0, 1fr) auto; }
  #barra .barra-buscar { width: 100%; max-width: 440px; min-width: 0; }
}
@media (orientation: landscape) and (max-height: 500px) { #barra .barra-izq { --hb-ancho: 64px; --hb-alto: 48px; } #barra .barra-izq .corto { font-size: 10.5px; } }
@media (orientation: portrait) and (max-width: 1023px) { #barra .barra-izq { --hb-ancho: 66px; --hb-alto: 54px; } #barra .barra-izq .corto { font-size: 10.5px; } }
@media (orientation: portrait) and (max-width: 699px) { #barra .barra-izq { --hb-ancho: 44px; --hb-alto: 44px; } #barra .barra-izq .corto { display: none; } }

/* Nota 279: en Volumen, la medida elegida sin raya roja; solo el fondo más claro. */
.calc .calc-campo[aria-pressed="true"] { box-shadow: none; background: rgba(255, 255, 255, .22); }

/* ============================================================ Nota 291: pistas de uso (pistas.js) */
/* Dedo casi transparente que hace el gesto sobre la función y una burbuja corta al lado. Sale una vez por equipo. */
.pista { position: fixed; inset: 0; z-index: 85; pointer-events: none; }
.pista[hidden] { display: none; }
.pista-dedo { position: absolute; left: var(--x); top: var(--y); width: 46px; height: 46px; margin: -6px 0 0 -18px; opacity: 0; }
.pista-dedo svg { width: 100%; height: 100%; fill: rgba(255, 255, 255, .5); stroke: rgba(255, 255, 255, .85); stroke-width: 1.4; stroke-linejoin: round;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55)); }
.pista-globo { position: absolute; left: calc(var(--x) + 34px); top: calc(var(--y) + 34px); max-width: min(260px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 12px;
  color: #fff; background: rgba(16, 18, 22, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 18px 36px -16px rgba(0, 0, 0, .9); font: 700 14px/1.3 var(--cuerpo, "Nunito Sans", sans-serif); opacity: 0; }
.pista.globo-izq .pista-globo { left: auto; right: calc(100vw - var(--x) + 34px); }
.pista.globo-arriba .pista-globo { top: auto; bottom: calc(100vh - var(--y) + 30px); }
.pista.ver .pista-globo { animation: pista-globo .4s .25s cubic-bezier(.32, .72, 0, 1) forwards; }
.pista.ver .pista-dedo { animation: pista-entra .3s ease-out forwards, pista-tocar 1.3s .3s ease-in-out 3; }
.pista.ver[data-gesto="bajar"] .pista-dedo { animation: pista-entra .3s ease-out forwards, pista-bajar 1.4s .3s ease-in-out 3; }
.pista.ver[data-gesto="arrastrar"] .pista-dedo { animation: pista-entra .3s ease-out forwards, pista-arrastrar 1.5s .3s ease-in-out 3; }
.pista.ver[data-gesto="deslizar"] .pista-dedo { animation: pista-entra .3s ease-out forwards, pista-deslizar 1.2s .3s ease-in-out 3; }
.pista.sale { transition: opacity .25s ease; opacity: 0; }
@keyframes pista-entra { to { opacity: 1; } }
@keyframes pista-globo { from { opacity: 0; transform: translateY(6px) scale(.97); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pista-tocar { 0%, 100% { transform: scale(1); } 40% { transform: scale(.82); } 60% { transform: scale(.86); } }
@keyframes pista-bajar { 0% { transform: translateY(40px); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-50px); opacity: 0; } }
@keyframes pista-arrastrar { 0% { transform: translateX(-50px); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateX(50px); opacity: 0; } }
@keyframes pista-deslizar { 0% { transform: translateY(24px); opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(-24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pista.ver .pista-dedo, .pista.ver[data-gesto] .pista-dedo { animation: none; opacity: 1; }
  .pista.ver .pista-globo { animation: none; opacity: 1; }
}

/* ============================================================ Nota 293: recorrido guiado (recorrido.js) */
.rc-elegir { position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; padding: 16px; background: rgba(5, 6, 8, .6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.rc-elegir-caja { width: min(420px, 100%); display: grid; gap: 10px; padding: 16px; border-radius: 16px; color: #f4f5f7; background: rgba(16, 18, 22, .94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 40px 80px -30px rgba(0, 0, 0, .95); font-family: var(--cuerpo, "Nunito Sans", sans-serif);
  animation: tj-humo .45s cubic-bezier(.22, .8, .24, 1) backwards; }
.rc-elegir-caja header { display: flex; align-items: center; justify-content: space-between; }
.rc-elegir-caja h2 { margin: 0; font: italic 800 19px/1.2 var(--titulo, Montserrat, sans-serif); }
.rc-x { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 9px; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .08); }
.rc-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.rc-completo { min-height: 52px; border: 0; border-radius: 10px; cursor: pointer; color: var(--sobre-acento, #fff); background: var(--acento, #d71f30); font: 800 16px/1 var(--cuerpo, sans-serif); }
.rc-sub { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .6); }
.rc-pantallas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc-pantallas button { min-height: 48px; border: 0; border-radius: 10px; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .08); font: 700 14.5px/1.2 var(--cuerpo, sans-serif); }
.rc-pantallas button:hover, .rc-x:hover { background: rgba(255, 255, 255, .15); }
.rc-velo { position: fixed; inset: 0; z-index: 95; background: rgba(4, 5, 7, .62); transition: clip-path .25s ease; }
.rc-aro { position: fixed; z-index: 96; pointer-events: none; border-radius: 10px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 24px 2px rgba(255, 255, 255, .25);
  transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; animation: rc-latido 1.6s ease-in-out infinite; }
.rc-aro[hidden] { display: none; }
@keyframes rc-latido { 50% { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 34px 6px rgba(255, 255, 255, .35); } }
.rc-globo { position: fixed; z-index: 97; width: min(320px, calc(100vw - 16px)); display: grid; gap: 8px; padding: 14px 16px 12px; border-radius: 14px; color: #fff;
  background: rgba(16, 18, 22, .96); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 24px 50px -20px rgba(0, 0, 0, .95); font-family: var(--cuerpo, "Nunito Sans", sans-serif);
  transition: left .25s ease, top .25s ease; }
.rc-globo.centro { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
.rc-globo.entra { animation: pista-globo .32s cubic-bezier(.32, .72, 0, 1); }
.rc-globo small { font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .55); }
.rc-texto { margin: 0; font: 700 16px/1.3 var(--cuerpo, sans-serif); }
.rc-botones { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; }
.rc-botones button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 9px; cursor: pointer; font: 800 14px/1 var(--cuerpo, sans-serif); }
.rc-salir { color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .07); }
.rc-sig { color: var(--sobre-acento, #fff); background: var(--acento, #d71f30); }
.rc-sig.suave { color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .1); }
@media (prefers-reduced-motion: reduce) { .rc-aro, .rc-globo.entra, .rc-elegir-caja { animation: none; } .rc-velo, .rc-aro, .rc-globo { transition: none; } }
