/* Latina Pizza · La persona que entró: botón de arriba a la derecha y su tarjeta.
   La foto va en un círculo con anillo blanco y gris, como el óvalo del logo;
   sin foto, las iniciales sobre azul y rojo. */

/* ---------- Foto o iniciales ---------- */
.avatar {
  --t: 40px; --anillo: #fff;
  position: relative; flex: none; width: var(--t); height: var(--t); border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(90deg, var(--azul) 0 50%, var(--rojo) 50% 100%);
  color: #fff; font-family: var(--serif); font-weight: 700; font-size: calc(var(--t) * 0.38); line-height: 1;
  box-shadow: 0 0 0 2px var(--anillo), 0 0 0 3.5px var(--gris-logo);
}
.avatar-ini { text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22); letter-spacing: 0.02em; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.con-foto .avatar-ini { visibility: hidden; }
.avatar-s { --t: 34px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9); }
.avatar-m { --t: 36px; --anillo: var(--paper); }
.avatar-l { --t: 64px; --anillo: var(--paper); box-shadow: 0 0 0 3px var(--anillo), 0 0 0 5px var(--gris-logo); }
.avatar-xl { --t: 96px; --anillo: var(--paper); box-shadow: 0 0 0 4px var(--anillo), 0 0 0 7px var(--gris-logo); }

/* ---------- Botón de arriba a la derecha ---------- */
.cuenta { gap: 0; }
.cuenta-boton {
  display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 250px;
  padding: 4px 10px 4px 4px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.08); color: #fff; font: inherit; text-align: left;
}
.cuenta-boton:hover { background: rgba(255, 255, 255, 0.16); }
.cuenta-boton:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.85); outline-offset: 2px; }
.cuenta-texto { display: grid; min-width: 0; line-height: 1.2; }
.cuenta-texto b { font-size: 0.875rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cuenta-texto small { font-size: 0.75rem; color: rgba(255, 255, 255, 0.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cuenta-flecha { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }
/* Con el menú completo en pantallas medianas solo cabe la foto */
@media (min-width: 1181px) and (max-width: 1309px) {
  .cuenta-boton { padding: 3px; gap: 0; }
  .cuenta-texto, .cuenta-flecha { display: none; }
}

/* ---------- La tarjeta ---------- */
.tarjeta-yo {
  position: fixed; inset: 62px 16px auto auto; margin: 0; padding: 0; border: 0;
  width: min(360px, calc(100vw - 24px)); max-height: calc(100dvh - 76px); overflow-y: auto;
  border-radius: 20px; background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 70px rgba(10, 14, 40, 0.34), 0 2px 6px rgba(10, 14, 40, 0.12);
}
.tarjeta-yo::backdrop { background: rgba(13, 16, 34, 0.3); }
.tarjeta-yo[open] { animation: ty-entra 0.16s ease-out; }
@keyframes ty-entra { from { opacity: 0; transform: translateY(-8px); } }

.ty-cab { position: relative; height: 88px; background: var(--azul); overflow: hidden; }
.ty-cab::before {
  content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.09);
  -webkit-mask: url(../img/fondo.svg) 0 0 / 260px 260px repeat; mask: url(../img/fondo.svg) 0 0 / 260px 260px repeat;
}
.ty-cab::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--rojo); }
.ty-cerrar {
  position: absolute; z-index: 1; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 1.5rem; line-height: 1;
}
.ty-cerrar:hover { background: rgba(255, 255, 255, 0.24); }

.ty-persona { position: relative; display: grid; justify-items: center; text-align: center; gap: 4px; margin-top: -50px; padding: 0 20px 16px; }
.ty-foto { position: relative; margin-bottom: 10px; }
.ty-camara {
  position: absolute; right: -4px; bottom: -2px; width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; border: 3px solid var(--paper); background: var(--rojo); color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.ty-camara:hover { background: var(--azul); }
.ty-camara svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.ty-persona h2 { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; line-height: 1.25; color: var(--titulo); margin: 0; max-width: 26ch; }
.ty-puesto { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 10px; color: var(--ink-2); font-weight: 600; }
.ty-editar, .ty-quitar { font-size: 0.875rem; font-weight: 600; color: var(--basil-txt); }
.ty-quitar { margin-top: 2px; }
.ty-puesto-form { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin-top: 4px; }
.ty-puesto-form input { flex: 1 1 100%; }
.ty-puesto-form .btn { flex: 1 1 0; }

.ty-datos { margin: 0; padding: 14px 20px; display: grid; gap: 10px; border-top: 1px solid var(--line-2); }
.ty-datos > div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; align-items: baseline; }
.ty-datos dt { color: var(--ink-3); font-size: 0.8125rem; }
.ty-datos dd { margin: 0; font-size: 0.9375rem; overflow-wrap: anywhere; }

/* Atajo a los avisos (dueños y contador) */
.ty-avisos {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 20px; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none;
}
.ty-avisos:hover { background: var(--flour); }
.ty-avisos:focus-visible { outline: 3px solid color-mix(in srgb, var(--basil) 55%, transparent); outline-offset: -3px; }
.ty-avisos-ico {
  width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--azul); color: #fff;
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.ty-avisos-txt { display: grid; line-height: 1.3; }
.ty-avisos-txt b { font-size: 0.9375rem; }
.ty-avisos-txt small { color: var(--ink-3); font-size: 0.8125rem; }
.ty-avisos-flecha { width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ty-tema { display: grid; gap: 8px; padding: 12px 20px 14px; border-top: 1px solid var(--line-2); }
.ty-etq { color: var(--ink-3); font-size: 0.8125rem; }
.ty-segmentos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 12px; background: var(--flour); }
.ty-segmentos button {
  min-height: 40px; padding: 6px 4px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--ink-2); font: inherit; font-size: 0.875rem; font-weight: 600;
}
.ty-segmentos button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(10, 14, 40, 0.16); }

.ty-acciones { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 14px 20px 20px; border-top: 1px solid var(--line-2); }
.btn-salir { color: var(--tomato); }

/* En el celular la tarjeta sube desde abajo, como el menú "Más" */
@media (max-width: 760px) {
  .tarjeta-yo {
    inset: auto 0 0 0; width: 100%; max-width: none; max-height: 92dvh; border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tarjeta-yo[open] { animation-name: ty-sube; }
  @keyframes ty-sube { from { transform: translateY(24px); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .tarjeta-yo[open] { animation: none; } }

/* ---------- Ajustes → Usuarios ---------- */
.aj-persona { display: flex; align-items: center; gap: 12px; }
.aj-persona-txt { min-width: 0; }
.aj-foto { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.aj-foto-acc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 220px; }
.aj-foto-acc .ayuda { flex-basis: 100%; margin: 0; }

/* Código del celular en la tarjeta de la persona (048) */
.ty-codigo { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line-2); }
.ty-codigo-falta { background: var(--crust-weak); }
.ty-codigo-falta .ty-avisos-txt small { color: var(--crust-txt); }
.ty-codigo-btn { grid-column: 2; justify-self: start; min-height: 34px; padding: 5px 14px; font-size: 0.875rem; margin-top: 4px; }
