    
    /* ── Declaracion fuentes ── */
     @font-face {
      font-family: 'Inter';
      /*src: url('/recursos/fuentes/Inter/Inter-VariableFont.ttf') format('truetype');*/
      src: url('/recursos/fuentes/Inter/Inter-VariableFont.woff2') format('woff2');
      font-weight: 100 900;
      font-style: normal;
      font-display: swap;
    }


    /* ── Variables ────────────────────────────────────────────────────────── */
    :root {
      --ulpgc-blue:     #004698;
      --ulpgc-blue-mid: #1e4d8c;
      --ulpgc-btn:      #1d4580;
      --section-blue:   #1a4fa0;
      --border:         #d8dde6;
      --row-bg:         #f8f9fb;
      --label:          #444;
      --value:          #111;
      --bg:             #f0f2f5;
      --white:          #ffffff;
      --shadow:         0 2px 8px rgba(0,0,0,.10);
      --font:           'Segoe UI', Arial, sans-serif;
    }
 
    /* ── Reset ────────────────────────────────────────────────────────────── */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
 
    body {
      font-family: 'Inter';
      background: var(--bg);
      color: var(--value);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }
 
    /* ── Header ───────────────────────────────────────────────────────────── */
  header {
    font-family: 'Inter';
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(90deg, #0b3d91, #1e5bb8);
  }
 
    .header-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--white);
      text-decoration: none;
    }
 
    /* Logo ULPGC — Q estilizada */
    .brand-logo {
      height: 64px;
      width: 64px;
      object-fit: contain;
      transform: scale(4.5);   /* Ajusta el valor a tu gusto */
      transform-origin: left center;
    }
 
    .brand-text {
      display: flex;
      flex-direction: column;
      line-height: 1.2;
    }
 
    .brand-name { font-size: 18px; font-weight: 700; letter-spacing: .3px; }
    .brand-sub  { font-size: 12px; opacity: .85; font-weight: 400; }
 
    /* ── Buscador ─────────────────────────────────────────────────────────── */
    .search-wrapper {
      position: relative;
      width: 320px;
    }
 
    /* INPUT tipo “pill” */
    .search-input {
      width: 100%;
      padding: 10px 42px 10px 16px;
      border: none;
      border-radius: 999px;
      background: #ffffff;
      font-size: 14px;
      outline: none;
      box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }

    .search-input:focus {
      box-shadow: 0 0 0 3px rgba(255,255,255,0.25);
    }

    /* ICONO DENTRO */
    .search-btn {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      background: transparent;
      border: none;
      cursor: pointer;
      padding: 0;
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .search-btn svg {
      width: 18px;
      height: 18px;
      fill: #0b3d91;
    }
 
    /* ── Dropdown ─────────────────────────────────────────────────────────── */
    .search-dropdown {
      position: absolute;
      top: 110%;
      left: 0;
      right: 0;
      background: white;
      border-radius: 10px;
      box-shadow: 0 10px 25px rgba(0,0,0,0.15);
      overflow: hidden;
      z-index: 999;
    }
 
    .dd-item {
      padding: 10px 14px;
      cursor: pointer;
      border-bottom: 1px solid var(--row-bg);
      font-size: 14px;
    }
    .dd-item:last-child { border-bottom: none; }
    .dd-item:hover { background: var(--row-bg); }
    .dd-name { font-weight: 600; color: var(--ulpgc-blue); }
    .dd-sub  { font-size: 12px; color: #666; margin-top: 2px; }
    .dd-msg  { padding: 12px 14px; font-size: 13px; color: #888; text-align: center; }
 
    /* ── Main ─────────────────────────────────────────────────────────────── */
    main {
      font-family: 'Inter';
      flex: 1;
      padding: 28px 40px;
      max-width: 1280px;
      width: 100%;
      margin: 0 auto;
    }
 
    /* ── Cabecera de página ───────────────────────────────────────────────── */
    .page-hdr {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 22px;
    }
    .page-title { font-size: 22px; font-weight: 700; }
 
    .action-btns {
      display: flex;
      gap: 10px;
      visibility: hidden;
      opacity: 0;
      transition: opacity .2s;
    }
    .action-btns.visible { visibility: visible; opacity: 1; }
 
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 9px 18px;
      border-radius: 4px;
      font-size: 14px;
      font-family: 'Inter';
      font-weight: 600;
      cursor: pointer;
      border: none;
      transition: filter .15s;
    }

    .btn:hover { filter: brightness(1.10); }
    .btn-primary { background: var(--ulpgc-btn); color: var(--white); }
    .btn-outline  {
      background: var(--white);
      color: var(--ulpgc-btn);
      border: 2px solid var(--ulpgc-btn);
    }

    .btn svg { width: 15px; height: 15px; flex-shrink: 0; }
    .btn-primary svg { fill: var(--white); }
    .btn-outline  svg { fill: var(--ulpgc-btn); }

    .btn-danger {
      background: var(--white);
      color: #d0342c;
      border: 2px solid #d0342c;
    }
    .btn-danger svg { fill: #d0342c; }
    .btn-danger:hover {
      background: #d0342c;
      color: var(--white);
    }
    .btn-danger:hover svg { fill: var(--white); }

 
    /* ── Spinner ──────────────────────────────────────────────────────────── */
    .spinner {
      display: none;
      text-align: center;
      padding: 60px 0;
      color: #888;
      font-size: 14px;
    }
    .spinner.visible { display: block; }
    .spin-ring {
      width: 32px; height: 32px;
      border: 3px solid var(--border);
      border-top-color: #1d6fbe;
      border-radius: 50%;
      animation: spin .7s linear infinite;
      display: inline-block;
      margin-bottom: 10px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
 
    /* ── Estado vacío ─────────────────────────────────────────────────────── */
    .empty-state {
      text-align: center;
      padding: 72px 0 48px;
      color: #bbb;
    }
    .empty-state svg { fill: #d8dde6; width: 64px; height: 64px; }
    .empty-state p   { margin-top: 14px; font-size: 15px; }
 
    /* ── Tarjeta ──────────────────────────────────────────────────────────── */
    .card {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 6px;
      margin-bottom: 20px;
      overflow: hidden;
      display: none;
    }
    .card.visible {
      display: block;
      animation: cardFadeIn .6s ease both;
    }

    /* Observaciones aparece un pelín después que Información: da sensación de orden */
    #cardObs.visible { animation-delay: .15s; }

    @keyframes cardFadeIn {
      from { opacity: 0; transform: translateY(18px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* Respeta a quien tiene desactivadas las animaciones en su SO/navegador */
    @media (prefers-reduced-motion: reduce) {
      .card.visible,
      #cardObs.visible { animation: none; }
    }
 
    .card-hdr {
      padding: 13px 20px;
      border-bottom: 1px solid var(--border);
    }
    .card-hdr h2 {
      font-size: 15px;
      font-weight: 700;
      color: var(--section-blue);
    }
  /* Header de la tarjeta Observaciones: título a la izquierda, botones a la derecha */
  .card-hdr--obs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  /* Header de la tarjeta Información: título a la izquierda, fecha de alta a la derecha */
  .card-hdr--info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

  .fecha-alta {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
  }
  .fecha-alta strong {
    color: var(--label);
    font-weight: 700;
  }


  /* Botones dentro del header: sin el borde/padding superior que tienen
    normalmente en .edit-actions (eso es para el pie de los modales) */
  .edit-actions--hdr {
    padding: 0;
    border-top: none;
    justify-content: flex-end;
  }

  .edit-actions--hdr .btn{
    transform: translateY(-8px);
  }
 
    /* ── Grid de campos: pares de 2 columnas + filas de ancho completo ──────── */
    .fg-pair {                              /* pareja de 2 campos cortos */
      display: grid;
      grid-template-columns: 1fr 1fr;
    }

    .f {                                    /* field (dentro de .fg-pair) */
      padding: 13px 20px;
      border-right: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
    }
    .fg-pair .f:last-child { border-right: none; }

    /* Variante sin borde inferior: para la última fila antes de otra sección
      que ya trae su propio border-top (evita doble línea) */
    .fg-pair--noborder .f { border-bottom: none; }

    .f-full {                               /* campo de ancho completo (valores largos) */
      padding: 13px 20px;
      border-bottom: 1px solid var(--border);
    }
    .f-full--noborder { border-bottom: none; }

    .field-cap {                            /* cabecera de sección, p.ej. "Contacto" */
      padding: 10px 20px 4px;
      font-size: 15px;
      font-weight: 700;
      color: var(--section-blue);
      background: var(--white);
      border-bottom: 1px solid var(--border);
    }
 
    .fl { 
      font-size: 16px; 
      font-weight: 700; 
      color: var(--label); 
      margin-bottom: 4px; 
    }

    .fv { 
      font-size: 14px; color: var(--value); 
    }

    .fv.empty { 
      color: #ccc; 
    }
 
    /* ── Fila de foto ─────────────────────────────────────────────────────── */
    .foto-wrap {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-top: 4px;
    }
    .foto-thumb {
      width: 56px; height: 56px;
      border: 1px solid var(--border);
      border-radius: 4px;
      background: #eef0f4;
      display: flex; align-items: center; justify-content: center;
      overflow: hidden;
      flex-shrink: 0;
    }
    .foto-thumb img { width: 100%; height: 100%; object-fit: cover; }
    .foto-thumb svg { fill: #b0b8c8; width: 30px; height: 30px; }
 
    /* ── Texto de observaciones ───────────────────────────────────────────── */
    .obs-text {
      background: var(--row-bg);
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: 10px 14px;
      font-size: 14px;
      color: var(--value);
      min-height: 40px;
      line-height: 1.5;
      white-space: pre-wrap;   /* ← respeta \n y no desborda */
      word-break: break-word;  /* ← evita que líneas largas rompan el layout */
    }
 
    /* ── Bloque de una observación ────────────────────────────────────────── */
    .obs-block {
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
    }
    .obs-block:last-child { border-bottom: none; }
 
    /* ── Modal foto ───────────────────────────────────────────────────────── */
    .modal-bg {
      display: none;
      position: fixed; inset: 0;
      background: rgba(0,0,0,.55);
      z-index: 1000;
      align-items: center;
      justify-content: center;
    }
    .modal-bg.open { display: flex; }

    /* El modal de contraseña siempre debe quedar por encima de cualquier otro modal */
    #modalPassword {
      z-index: 1100;
    }

    .modal-box {
      background: var(--white);
      border-radius: 8px;
      padding: 28px 24px 20px;
      max-width: 520px;
      width: 90%;
      text-align: center;
      box-shadow: 0 8px 32px rgba(0,0,0,.28);
      position: relative;
    }
    .modal-close {
      position: absolute; top: 10px; right: 14px;
      background: none; border: none;
      font-size: 24px; cursor: pointer; color: #888; line-height: 1;
    }
    .modal-close:hover { color: #333; }
    .modal-box img {
      max-width: 100%;
      max-height: 420px;
      border-radius: 4px;
      border: 1px solid var(--border);
    }
    .modal-box p { margin-top: 10px; font-size: 13px; color: #888; }
 
    /* ── Footer ───────────────────────────────────────────────────────────── */
    footer {
      font-family: 'Inter';
      background: var(--ulpgc-blue);
      color: rgba(255,255,255,.80);
      text-align: center;
      font-size: 13px;
      padding: 16px 32px;
      flex-shrink: 0;
    }

    /* ── Cabecera de página con avatar ──────────────────────────────────────── */
    .titulo-contacto {
      display: flex;
      align-items: center;
      gap: 14px;
    }
 
    /* Círculo del avatar */
    .avatar-circle {
      position: relative;
      width: 120px;
      height: 120px;
      border-radius: 50%;
      background: #dde3ee;
      border: 2px solid var(--border, #d8dde6);
      overflow: hidden;
      cursor: pointer;
      flex-shrink: 0;
      transition: border-color .2s;
    }
    .avatar-circle:hover { border-color: var(--ulpgc-btn, #1d4580); }

    /* Avatar de solo lectura (modal editar) — sin interacción */
    .avatar-circle--readonly {
      cursor: default;
    }
    .avatar-circle--readonly:hover {
      border-color: var(--border, #d8dde6);
    }
    
    /* Icono por defecto (SVG centrado) */
    .avatar-icon-default {
      position: absolute;
      inset: 0;
      margin: auto;
      width: 68px;
      height: 68px;
      fill: #9aa3b5;
    }
 
    /* Imagen cuando existe foto */
    .avatar-circle img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    /* Fade-in solo para el avatar de la ficha principal (no afecta a los
       avatares de los modales de nuevo/editar, que son previsualizaciones locales) */
    #avatarImg {
      opacity: 0;
      transition: opacity .6s ease;
    }
    #avatarImg.loaded {
      opacity: 1;
    }
    
    /* Overlay con icono cámara al hacer hover */
    .avatar-overlay {
      position: absolute;
      inset: 0;
      background: rgba(26, 58, 107, 0.55);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity .2s;
    }
    .avatar-circle:hover .avatar-overlay { opacity: 1; }
    .avatar-overlay svg {
      width: 44px;
      height: 44px;
      fill: #ffffff;
    }
 
    /* Título dinámico junto al avatar */
    .page-title {
      font-size: 22px;
      font-weight: 700;
      color: var(--value, #111);
    }
    
    /* Texto de observaciones — respetar saltos de línea de la BD */
    .obs-text {
      background: var(--row-bg, #f8f9fb);
      border: 1px solid var(--border, #d8dde6);
      border-radius: 4px;
      padding: 10px 14px;
      font-size: 14px;
      color: var(--value, #111);
      min-height: 40px;
      line-height: 1.5;
      white-space: pre-wrap;   /* respeta \n de la BD */
      word-break: break-word;
    }
 
    /* Bloque de observación individual */
    .obs-block {
      padding: 16px 20px;
      border-bottom: 1px solid var(--border, #d8dde6);
    }
    .obs-block:last-child { border-bottom: none; }

    /* Texto de Locales Autorizados */
    .text-block{
        padding:16px 20px;
        border-top:1px solid var(--border);
    }

    .text-block .fl{
        margin-bottom:6px;
    }


/* ════════════════════════════════════════════════════════════════════════════
                            MODAL EDITAR CONTACTO
   ════════════════════════════════════════════════════════════════════════════ */
 
  /* Caja del modal de edición — más ancha que el de confirmación */
  .modal-edit-box {
    max-width: 700px;
    text-align: left;
  }
  
  .modal-edit-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--ulpgc-blue);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  
  /* Grid de campos del formulario */
  .edit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 16px;
    margin-bottom: 16px;
  }
  
  /* Campo individual */
  .edit-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  /* Campo que ocupa todo el ancho */
  .edit-field--full {
    grid-column: 1 / -1;
  }
  
  /* Etiqueta */
  .edit-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--label);
    letter-spacing: .3px;
    text-transform: uppercase;
  }
  
  /* Input y textarea */
  .edit-input {
    font-family: 'Inter';
    font-size: 14px;
    color: var(--value);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 10px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
  }
  
  .edit-input:focus {
    border-color: var(--ulpgc-btn);
    box-shadow: 0 0 0 3px rgba(29, 69, 128, 0.12);
  }
  
  .edit-input.input-error {
    border-color: #d0342c;
    box-shadow: 0 0 0 3px rgba(208, 52, 44, 0.12);
  }
  
  .edit-textarea {
    resize: vertical;
    min-height: 72px;
  }
  
  /* Mensaje de error inline */
  .edit-error {
    display: none;
    background: #fff0f0;
    border: 1px solid #f5c6c6;
    border-radius: 4px;
    color: #b00;
    font-size: 13px;
    padding: 8px 12px;
    margin-bottom: 14px;
  }
  .edit-error.visible { display: block; }
  
  /* Fila de botones inferior */
  .edit-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 14px;
    border-top: none;
  }
  
  /* Spinner pequeño dentro del botón Guardar */
  .btn-saving {
    opacity: .7;
    pointer-events: none;
  }


  /* ── Avatar en modal "Nuevo contacto" ──────────────────────────────────── */
  .new-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
  }

  /* Versión algo más pequeña para que quepa bien en el modal */
  .avatar-circle--modal {
    width: 96px;
    height: 96px;
  }
  .avatar-circle--modal .avatar-icon-default {
    width: 52px;
    height: 52px;
  }

  .new-avatar-hint {
    font-size: 12px;
    color: #888;
  }


/* ════════════════════════════════════════════════════════════════════════════
                                  TOASTS
   ════════════════════════════════════════════════════════════════════════════ */
.toast-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding-top: 14px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter';
  width: max-content;
  max-width: 90vw;
  border: 1px solid;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  pointer-events: auto;
  animation: toast-in .25s ease forwards;
}

.toast svg { width: 20px; height: 20px; flex-shrink: 0; }
.toast span { line-height: 1.35; }

/* Éxito → verde transparente */
.toast.toast-success {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.45);
  color: #15803d;
}
.toast.toast-success svg { fill: #15803d; }

/* Error → rojo transparente */
.toast.toast-error {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.45);
  color: #b91c1c;
}
.toast.toast-error svg { fill: #b91c1c; }

.toast.toast-out { animation: toast-out .25s ease forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-10px); }
}

/* ── Grupo derecho del header (botón nuevo + buscador) ───────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-header-nuevo {
  padding: 9px 16px;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}


/* ════════════════════════════════════════════════════════════════════════════
                                   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════════════════
                                 TABLET Y MÓVIL
   ════════════════════════════════════════════════════════════════════════════ */

/* Evita el zoom automático de iOS al enfocar inputs */
@media (max-width: 900px) {
  .search-input, .edit-input, #recuperarSearchInput, #obsTexto,
  #passwordInput { font-size: 16px; }
}

/* ── Tablet (≤ 900px) ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  header { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .header-right { flex-wrap: wrap; width: 100%; justify-content: flex-end; }
  .search-wrapper { width: 100%; order: 3; }

  main { padding: 20px 20px; }

  .edit-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Móvil (≤ 600px) ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .brand-logo { transform: scale(3); }
  .header-right { gap: 10px; }
  .btn-header-nuevo {
    flex: 1 1 calc(50% - 5px);
    justify-content: center;
    padding: 9px 10px;
    font-size: 12.5px;
    white-space: normal;
  }

  main { padding: 16px 14px; }

  .page-hdr { flex-direction: column; align-items: stretch; gap: 16px; }
  .titulo-contacto { gap: 10px; }
  .avatar-circle { width: 80px; height: 80px; }
  .avatar-icon-default { width: 44px; height: 44px; }
  .page-title { font-size: 18px; }

  .action-btns { flex-wrap: wrap; }
  .action-btns .btn { justify-content: center; }
  .action-btns .btn:nth-child(1),
  .action-btns .btn:nth-child(2) { flex: 1 1 calc(50% - 5px); }
  .action-btns .btn:nth-child(3) { flex: 1 1 100%; }

  .card-hdr--info { flex-direction: column; align-items: flex-start; gap: 4px; }
  .card-hdr--obs { flex-direction: column; align-items: flex-start; gap: 10px; }
  .edit-actions--hdr { width: 100%; }
  .edit-actions--hdr .btn { flex: 1; transform: none; justify-content: center; }

  .edit-grid { grid-template-columns: 1fr; }
  .modal-edit-box { max-width: 94vw; padding: 22px 16px 16px; }
  .modal-box { width: 94vw; padding: 22px 16px 16px; }

  .edit-actions { flex-direction: column-reverse; }
  .edit-actions .btn { width: 100%; justify-content: center; }

  .toast { width: 90vw; font-size: 13px; }
}

/* ── Móviles pequeños (≤ 400px) ───────────────────────────────────────── */
@media (max-width: 400px) {
  .brand-sub { display: none; }
  .avatar-circle { width: 64px; height: 64px; }
  .btn-header-nuevo { font-size: 11.5px; padding: 8px 6px; }
}

/* ════════════════════════════════════════════════════════════════════════════
                       AJUSTES ESPECÍFICOS DE ORIENTACIÓN
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Tablets en portrait (iPad y similares: 600–1024px de ancho) ────────── */
@media (orientation: portrait) and (min-width: 600px) and (max-width: 1024px) {
  main { padding: 24px 32px; max-width: 760px; }

  .edit-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-edit-box { max-width: 640px; }

  .avatar-circle { width: 100px; height: 100px; }
  .page-title { font-size: 20px; }

  .action-btns .btn { flex: 1 1 auto; }
}

/* ── Móviles en portrait puro (la mayoría del uso real) ──────────────────── */
@media (orientation: portrait) and (max-width: 600px) {
  .titulo-contacto { flex-direction: column; align-items: flex-start; gap: 8px; }
  .avatar-circle { align-self: center; }
  .page-title { align-self: center; text-align: center; }

  .card-hdr h2 { font-size: 14px; }
  .obs-text { font-size: 13px; }
}

/* ── Móviles en landscape (altura reducida: cuidado con modales largos) ──── */
@media (orientation: landscape) and (max-height: 500px) {
  .modal-box, .modal-edit-box {
    max-height: 92vh;
    overflow-y: auto;
  }
  .avatar-circle { width: 56px; height: 56px; }
  .new-avatar-wrap { margin-bottom: 10px; }
  main { padding: 12px 20px; }
}

/* ── Fallback: si el navegador soporta detectar teclado virtual (iOS 15.4+) ── */
@media (orientation: portrait) {
  .modal-bg.open { align-items: flex-start; padding-top: 5vh; }
}