/* ═══════════════════════════════════════════════════════════════════════
   AMIGOS (mockups/barra-recorrer-amigos.html, A3 y A4; js/amigos.js)
   Pantalla clara sobre el mapa, de arriba hasta la barra, con los tokens de piel.css: un solo acento, tinta y grises.
   Nada por debajo de 12 px.
   ═══════════════════════════════════════════════════════════════════════ */
.am-panel { position: fixed; left: 0; right: 0; top: 0; bottom: calc(62px + var(--sa-abajo, 0px)); z-index: 1240; display: none;
  background: var(--bg); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; }
.am-panel.abierto { display: block; }
.am-panel .trazo { width: 18px; height: 18px; }

.am-cab { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--sa-arriba, 0px)) 16px 10px;
  background: var(--bg); }
.am-cuenta { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; position: relative; }
.am-cuenta .w-avatar { width: 38px; height: 38px; border: 0; box-shadow: none; }
.am-tit { min-width: 0; line-height: 1.2; }
.am-tit b { display: block; font-size: 20px; font-weight: 500; }
.am-tit small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

.am-cuerpo { max-width: 560px; margin: 0 auto; padding: 4px 16px 56px; }
.am-cuerpo > .spinner { margin: 48px auto; }

/* Monograma con la foto encima (si la foto falla, queda el monograma) */
.am-ava { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none; overflow: hidden;
  background: var(--field); color: var(--ink); font-size: 14px; font-weight: 500; }
.am-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.am-ava.vivo { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--acc); }

/* "Ahora": círculos con lo último de cada amigo */
.am-ahora { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 12px; margin: 0 -2px; scrollbar-width: none; }
.am-ahora::-webkit-scrollbar { display: none; }
.am-burbuja { display: grid; justify-items: center; gap: 2px; width: 64px; flex: none; color: inherit; text-decoration: none; text-align: center; }
.am-burbuja .am-ava { width: 56px; height: 56px; font-size: 16px; margin-bottom: 4px; }
.am-burbuja b { font-size: 12px; font-weight: 500; max-width: 64px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-burbuja small { font-size: 12px; color: var(--muted); }
.am-burbuja.vivo small { color: var(--acc); font-weight: 500; }

/* Tarjeta de tu equipo de Recorrer */
.am-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--surf);
  box-shadow: var(--csh); color: inherit; font: inherit; text-align: left; cursor: pointer; margin: 4px 0 6px; }
.am-card .tx { flex: 1; min-width: 0; line-height: 1.25; }
.am-card .tx b { display: block; font-size: 15px; font-weight: 500; }
.am-card .tx small { display: block; font-size: 13px; color: var(--muted); }
.am-card > .trazo { color: var(--muted); }

.am-k { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 22px 0 8px; font-size: 13px; font-weight: 500;
  letter-spacing: .02em; color: var(--muted); }
.am-k span { font-weight: 400; }
.am-nota { font-size: 13px; color: var(--muted); margin: -2px 0 8px; line-height: 1.4; }

/* Filas: actividad y personas */
.am-act, .am-fila { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.am-act + .am-act, .am-fila + .am-fila { border-top: 1px solid var(--line); }
.am-act > a { flex: none; }
.am-act .tx { flex: 1; min-width: 0; line-height: 1.3; }
.am-act .tx b { display: block; font-size: 14px; font-weight: 400; }
.am-act .tx small { display: block; font-size: 12px; color: var(--muted); }
.am-quien { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.am-quien .tx { min-width: 0; line-height: 1.3; }
.am-quien .tx b { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-quien .tx small { display: block; font-size: 12px; color: var(--muted); }
.am-fila .lado { display: flex; align-items: center; gap: 4px; flex: none; }
.am-vivo { color: var(--acc); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.am-vivo i { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); }

.am-x, .am-mini { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; }
.am-mini { background: var(--field); color: var(--ink); }
.am-x .trazo, .am-mini .trazo { width: 16px; height: 16px; }

/* Botones */
.am-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--acc); color: #fff; font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; }
.am-btn.blq { display: flex; width: 100%; margin-top: 12px; }
.am-btn.sec { background: var(--field); color: var(--ink); margin-top: 8px; }
.am-btn.ink { background: var(--ink); color: var(--surf); }
.am-btn.chico { min-height: 32px; padding: 0 14px; font-size: 13px; }
.am-btn:disabled { opacity: .6; cursor: default; }

/* Vacío y sin sesión (A4) */
.am-vacio { text-align: center; padding: 26px 10px 6px; }
.am-vacio b { display: block; font-size: 19px; font-weight: 400; line-height: 1.25; max-width: 320px; margin: 0 auto; }
.am-vacio p { font-size: 13px; color: var(--muted); max-width: 300px; margin: 8px auto 6px; line-height: 1.4; }
.am-ico-grande { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; background: var(--surf); color: var(--muted); box-shadow: var(--csh); }
.am-ico-grande .trazo { width: 32px; height: 32px; stroke-width: 1.3; }

/* Antes de activar Amigos */
.am-seg { padding: 14px 4px 8px; }
.am-seg h2 { font-size: 21px; font-weight: 500; text-align: center; margin: 0 0 4px; }
.am-seg .mut { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.am-seg ol { margin: 0; padding: 0; list-style: none; counter-reset: seg; display: grid; gap: 10px; }
.am-seg li { counter-increment: seg; position: relative; padding: 12px 14px 12px 50px; border-radius: 14px; background: var(--surf); font-size: 14px; line-height: 1.4; }
.am-seg li::before { content: counter(seg); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--surf);
  display: grid; place-items: center; font-size: 12px; font-weight: 500; }
.am-edad { display: grid; gap: 6px; margin: 16px 0 0; font-size: 14px; }
.am-edad input { min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surf); color: var(--ink); font: inherit; font-size: 16px; }
.am-edad small { font-size: 12px; color: var(--muted); }

.am-fila-link { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 22px; padding: 14px 4px; border: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.am-fila-link span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.am-pie { font-size: 12px; color: var(--muted); margin: 14px 2px 0; line-height: 1.45; }
.am-pie a { color: var(--ink); }

/* Hojas (CG.abrirHoja): el menú de un amigo y las cuentas que sigues */
.am-hoja-cab { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; font-size: 16px; }
.am-hoja-cab b { font-weight: 500; }
.am-hoja-t { font-size: 17px; font-weight: 500; margin: 2px 0 8px; }
.am-op { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 13px 2px; border: 0; border-top: 1px solid var(--line); background: none;
  color: inherit; font: inherit; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer; }
.am-op .trazo { width: 20px; height: 20px; margin-top: 1px; color: var(--muted); }
.am-op small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
